1 From: Tao Ma <tao.ma@oracle.com>
2 Date: Thu, 6 Nov 2008 08:10:48 +0800
3 Subject: ocfs2/xattr: Only set buffer update if it doesn't exist in cache.
6 When we call ocfs2_init_xattr_bucket, we deem that the new buffer head
7 will be written to disk immediately, so we just use sb_getblk. But in
8 some cases the buffer may have already been in ocfs2 uptodate cache,
9 so we only call ocfs2_set_buffer_uptodate if the buffer head isn't
12 Signed-off-by: Tao Ma <tao.ma@oracle.com>
13 Signed-off-by: Joel Becker <joel.becker@oracle.com>
14 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
16 fs/ocfs2/xattr.c | 6 ++++--
17 1 files changed, 4 insertions(+), 2 deletions(-)
19 diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
20 index 87cf39d..d8fc714 100644
21 --- a/fs/ocfs2/xattr.c
22 +++ b/fs/ocfs2/xattr.c
23 @@ -219,8 +219,10 @@ static int ocfs2_init_xattr_bucket(struct ocfs2_xattr_bucket *bucket,
27 - ocfs2_set_new_buffer_uptodate(bucket->bu_inode,
29 + if (!ocfs2_buffer_uptodate(bucket->bu_inode,
31 + ocfs2_set_new_buffer_uptodate(bucket->bu_inode,