summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/xattr.h
diff options
context:
space:
mode:
authorJunxiao Bi <junxiao.bi@oracle.com>2016-05-13 00:42:18 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2016-05-13 00:52:50 +0200
commitc25a1e0671fbca7b2c0d0757d533bd2650d6dc0c (patch)
tree568387253124f7f9aa738aea26f7964d048aa70b /fs/ocfs2/xattr.h
parentocfs2: revert using ocfs2_acl_chmod to avoid inode cluster lock hang (diff)
downloadlinux-c25a1e0671fbca7b2c0d0757d533bd2650d6dc0c.tar.xz
linux-c25a1e0671fbca7b2c0d0757d533bd2650d6dc0c.zip
ocfs2: fix posix_acl_create deadlock
Commit 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure") refactored code to use posix_acl_create. The problem with this function is that it is not mindful of the cluster wide inode lock making it unsuitable for use with ocfs2 inode creation with ACLs. For example, when used in ocfs2_mknod, this function can cause deadlock as follows. The parent dir inode lock is taken when calling posix_acl_create -> get_acl -> ocfs2_iop_get_acl which takes the inode lock again. This can cause deadlock if there is a blocked remote lock request waiting for the lock to be downconverted. And same deadlock happened in ocfs2_reflink. This fix is to revert back using ocfs2_init_acl. Fixes: 702e5bc68ad2 ("ocfs2: use generic posix ACL infrastructure") Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com> Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--fs/ocfs2/xattr.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ocfs2/xattr.h b/fs/ocfs2/xattr.h
index f10d5b93c366..1633cc15ea1f 100644
--- a/fs/ocfs2/xattr.h
+++ b/fs/ocfs2/xattr.h
@@ -94,7 +94,5 @@ int ocfs2_reflink_xattrs(struct inode *old_inode,
bool preserve_security);
int ocfs2_init_security_and_acl(struct inode *dir,
struct inode *inode,
- const struct qstr *qstr,
- struct posix_acl *default_acl,
- struct posix_acl *acl);
+ const struct qstr *qstr);
#endif /* OCFS2_XATTR_H */