Commit 4d1ae8c5 authored by Anton Altaparmakov's avatar Anton Altaparmakov Committed by Linus Torvalds

[PATCH] Remove NOOP code from fs/buffer.c::drop_buffers()

I noticed that fs/buffer.c::drop_buffers() contains some code that
AFAICS doesn't actually do anything other than waste cpu cycles so here
is patch to remove it...  The local variable was_uptodate is being
messed with but it is not being read anywhere so it seems entirely
pointless.

I assume this must be a remainder from old code which mucked around with
the page uptodateness but which has since been (re-)moved.
Signed-off-by: default avatarAnton Altaparmakov <aia21@cantab.net>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0816a653
...@@ -2895,7 +2895,6 @@ drop_buffers(struct page *page, struct buffer_head **buffers_to_free) ...@@ -2895,7 +2895,6 @@ drop_buffers(struct page *page, struct buffer_head **buffers_to_free)
{ {
struct buffer_head *head = page_buffers(page); struct buffer_head *head = page_buffers(page);
struct buffer_head *bh; struct buffer_head *bh;
int was_uptodate = 1;
bh = head; bh = head;
do { do {
...@@ -2903,8 +2902,6 @@ drop_buffers(struct page *page, struct buffer_head **buffers_to_free) ...@@ -2903,8 +2902,6 @@ drop_buffers(struct page *page, struct buffer_head **buffers_to_free)
set_bit(AS_EIO, &page->mapping->flags); set_bit(AS_EIO, &page->mapping->flags);
if (buffer_busy(bh)) if (buffer_busy(bh))
goto failed; goto failed;
if (!buffer_uptodate(bh) && !buffer_req(bh))
was_uptodate = 0;
bh = bh->b_this_page; bh = bh->b_this_page;
} while (bh != head); } while (bh != head);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment