Magellan Linux

Annotation of /trunk/kernel26-magellan/patches-2.6.16-r12/0115-2.6.16.12-reiserfs-deadlock.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 72 - (hide annotations) (download)
Mon Jun 5 09:25:38 2006 UTC (17 years, 11 months ago) by niro
File size: 1321 byte(s)
ver bump to 2.6.16-r12:
- updated to linux-2.6.16.19
- updated to ck11

1 niro 72 From: Jan Kara <jack@suse.cz>
2     Date: Sun, 23 Apr 2006 17:10:44 +0000 (+0000)
3     Subject: [PATCH] Fix reiserfs deadlock
4     X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/stable/linux-2.6.16.y.git;a=commitdiff;h=89d4fdf423aa5d02e0d5f79ceba238a35bf23aff
5    
6     [PATCH] Fix reiserfs deadlock
7    
8     reiserfs_cache_default_acl() should return whether we successfully found
9     the acl or not. We have to return correct value even if reiserfs_get_acl()
10     returns error code and not just 0. Otherwise callers such as
11     reiserfs_mkdir() can unnecessarily lock the xattrs and later functions such
12     as reiserfs_new_inode() fail to notice that we have already taken the lock
13     and try to take it again with obvious consequences.
14    
15     Signed-off-by: Jan Kara <jack@suse.cz>
16     Cc: <reiserfs-dev@namesys.com>
17     Signed-off-by: Andrew Morton <akpm@osdl.org>
18     Signed-off-by: Linus Torvalds <torvalds@osdl.org>
19     Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
20     ---
21    
22     --- a/fs/reiserfs/xattr_acl.c
23     +++ b/fs/reiserfs/xattr_acl.c
24     @@ -408,8 +408,9 @@ int reiserfs_cache_default_acl(struct in
25     acl = reiserfs_get_acl(inode, ACL_TYPE_DEFAULT);
26     reiserfs_read_unlock_xattrs(inode->i_sb);
27     reiserfs_read_unlock_xattr_i(inode);
28     - ret = acl ? 1 : 0;
29     - posix_acl_release(acl);
30     + ret = (acl && !IS_ERR(acl));
31     + if (ret)
32     + posix_acl_release(acl);
33     }
34    
35     return ret;