]> www.infradead.org Git - users/jedix/linux-maple.git/commit
add OCFS2_LOCK_RECURSIVE arg_flags to ocfs2_cluster_lock() to prevent hang
authorTariq Saeed <tariq.x.saeed@oracle.com>
Fri, 4 Sep 2015 22:39:03 +0000 (15:39 -0700)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Tue, 8 Sep 2015 18:19:11 +0000 (11:19 -0700)
commit387775a70d2e5d89d1a81d78d66655337a5c2765
tree8e0c065274bf5cdd5f42ded261aa8f5424b39f4b
parentf89f7188de2228c8894b5aab2a4105028f23f267
add OCFS2_LOCK_RECURSIVE arg_flags to ocfs2_cluster_lock() to prevent hang

Orabug: 21793017

ocfs2_setattr called by chmod command  holds cluster wide inode lock
(Orabug 21685187) when calling posix_acl_chmod. This
latter function in turn calls ocfs2_iop_get_acl and ocfs2_iop_set_acl.
These two are also called directly from vfs layer for getfacl/setfacl
commands and therefore acquire the cluster wide inode lock. If a remote
conversion request comes after the first inode lock in ocfs2_setattr,
OCFS2_LOCK_BLOCKED will be set in l_flags. This will cause the second
call to inode lock from the  ocfs2_iop_get|set_acl() to block indefinetly.
The new flag OCFS2_LOCK_RECURSIVE will be used to prevent this blocking.

Signed-off-by: Tariq Saeed <tariq.x.saeed@oracle.com>
Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
fs/ocfs2/acl.c
fs/ocfs2/dlmglue.c
fs/ocfs2/dlmglue.h