aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2008-11-05 19:10:48 -0500
committerMark Fasheh <mfasheh@suse.com>2009-01-05 11:34:18 -0500
commit757055adc5d41b910bdead925060f077dd2d9169 (patch)
treeac7032ec0d8fec4ec762fa9a0dc6d02a66453e25
parent1c32a2fd46ddc01bd86bff56a8f5d98c815750f4 (diff)
ocfs2/xattr: Only set buffer update if it doesn't exist in cache.
When we call ocfs2_init_xattr_bucket, we deem that the new buffer head will be written to disk immediately, so we just use sb_getblk. But in some cases the buffer may have already been in ocfs2 uptodate cache, so we only call ocfs2_set_buffer_uptodate if the buffer head isn't in the cache. Signed-off-by: Tao Ma <tao.ma@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
-rw-r--r--fs/ocfs2/xattr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 87cf39ddfe5b..d8fc714e9415 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -219,8 +219,10 @@ static int ocfs2_init_xattr_bucket(struct ocfs2_xattr_bucket *bucket,
219 break; 219 break;
220 } 220 }
221 221
222 ocfs2_set_new_buffer_uptodate(bucket->bu_inode, 222 if (!ocfs2_buffer_uptodate(bucket->bu_inode,
223 bucket->bu_bhs[i]); 223 bucket->bu_bhs[i]))
224 ocfs2_set_new_buffer_uptodate(bucket->bu_inode,
225 bucket->bu_bhs[i]);
224 } 226 }
225 227
226 if (rc) 228 if (rc)