]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.suse/ocfs2-xattr-Only-set-buffer-update-if-it-doesn-t-ex.patch
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.suse / ocfs2-xattr-Only-set-buffer-update-if-it-doesn-t-ex.patch
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.
4 Patch-mainline: 2.6.29
5
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
10 in the cache.
11
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>
15 ---
16 fs/ocfs2/xattr.c | 6 ++++--
17 1 files changed, 4 insertions(+), 2 deletions(-)
18
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,
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 --
37 1.5.6
38