]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.suse/ocfs2-xattr-Only-set-buffer-update-if-it-doesn-t-ex.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.suse / ocfs2-xattr-Only-set-buffer-update-if-it-doesn-t-ex.patch
CommitLineData
2cb7cef9
BS
1From: Tao Ma <tao.ma@oracle.com>
2Date: Thu, 6 Nov 2008 08:10:48 +0800
3Subject: ocfs2/xattr: Only set buffer update if it doesn't exist in cache.
4Patch-mainline: 2.6.29
5
6When we call ocfs2_init_xattr_bucket, we deem that the new buffer head
7will be written to disk immediately, so we just use sb_getblk. But in
8some cases the buffer may have already been in ocfs2 uptodate cache,
9so we only call ocfs2_set_buffer_uptodate if the buffer head isn't
10in the cache.
11
12Signed-off-by: Tao Ma <tao.ma@oracle.com>
13Signed-off-by: Joel Becker <joel.becker@oracle.com>
14Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15---
16 fs/ocfs2/xattr.c | 6 ++++--
17 1 files changed, 4 insertions(+), 2 deletions(-)
18
19diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
20index 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,
24 break;
25 }
26
27- ocfs2_set_new_buffer_uptodate(bucket->bu_inode,
28- bucket->bu_bhs[i]);
29+ if (!ocfs2_buffer_uptodate(bucket->bu_inode,
30+ bucket->bu_bhs[i]))
31+ ocfs2_set_new_buffer_uptodate(bucket->bu_inode,
32+ bucket->bu_bhs[i]);
33 }
34
35 if (rc)
36--
371.5.6
38