aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_fstype.c
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2011-03-17 16:19:58 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2011-04-18 15:23:50 +0100
commit44ad37d69b2cc421d5b5c7ad7fed16230685b092 (patch)
tree3632c63eef9e159947316f18d48054f082c0578e /fs/gfs2/ops_fstype.c
parent001e8e8df4283dd4ef7a0297c012fce364c05cf1 (diff)
downloadkernel_samsung_smdk4412-44ad37d69b2cc421d5b5c7ad7fed16230685b092.zip
kernel_samsung_smdk4412-44ad37d69b2cc421d5b5c7ad7fed16230685b092.tar.gz
kernel_samsung_smdk4412-44ad37d69b2cc421d5b5c7ad7fed16230685b092.tar.bz2
GFS2: filesystem hang caused by incorrect lock order
This patch fixes a deadlock in GFS2 where two processes are trying to reclaim an unlinked dinode: One holds the inode glock and calls gfs2_lookup_by_inum trying to look up the inode, which it can't, due to I_FREEING. The other has set I_FREEING from vfs and is at the beginning of gfs2_delete_inode waiting for the glock, which is held by the first. The solution is to add a new non_block parameter to the gfs2_iget function that causes it to return -ENOENT if the inode is being freed. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
-rw-r--r--fs/gfs2/ops_fstype.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 42ef243..d3c69eb 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -430,7 +430,7 @@ static int gfs2_lookup_root(struct super_block *sb, struct dentry **dptr,
struct dentry *dentry;
struct inode *inode;
- inode = gfs2_inode_lookup(sb, DT_DIR, no_addr, 0);
+ inode = gfs2_inode_lookup(sb, DT_DIR, no_addr, 0, 0);
if (IS_ERR(inode)) {
fs_err(sdp, "can't read in %s inode: %ld\n", name, PTR_ERR(inode));
return PTR_ERR(inode);