[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070515155224.29345.22719.stgit@warthog.cambridge.redhat.com>
Date: Tue, 15 May 2007 16:52:24 +0100
From: David Howells <dhowells@...hat.com>
To: akpm@...l.org, nickpiggin@...oo.com.au
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
dhowells@...hat.com
Subject: [PATCH 1/2] AFS: Fix afs_prepare_write()
afs_prepare_write() should not mark a page up to date if it only partially
fills it in, in expectation of the caller filling in the rest prior to calling
commit_write(). commit_write(), however, should mark the page up to date.
Signed-off-by: David Howells <dhowells@...hat.com>
---
fs/afs/write.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 28f3751..a03b92a 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page,
_leave(" = %d [prep]", ret);
return ret;
}
- SetPageUptodate(page);
}
try_again:
@@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page,
spin_unlock(&vnode->writeback_lock);
}
+ SetPageUptodate(page);
set_page_dirty(page);
-
if (PageDirty(page))
_debug("dirtied");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists