xfs: unlock i_mutex in xfs_break_layouts
authorChristoph Hellwig <hch@lst.de>
Mon, 13 Apr 2015 01:38:29 +0000 (11:38 +1000)
committerDave Chinner <david@fromorbit.com>
Mon, 13 Apr 2015 01:38:29 +0000 (11:38 +1000)
We want to drop all I/O path locks when recalling layouts, and that includes
i_mutex for the write path.  Without this we get stuck processe when recalls
take too long.

[dchinner: fix build with !CONFIG_PNFS]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_file.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_pnfs.c
fs/xfs/xfs_pnfs.h

index edeaccc..f63aedd 100644 (file)
@@ -555,7 +555,7 @@ restart:
        if (error)
                return error;
 
-       error = xfs_break_layouts(inode, iolock);
+       error = xfs_break_layouts(inode, iolock, true);
        if (error)
                return error;
 
@@ -842,7 +842,7 @@ xfs_file_fallocate(
                return -EOPNOTSUPP;
 
        xfs_ilock(ip, iolock);
-       error = xfs_break_layouts(inode, &iolock);
+       error = xfs_break_layouts(inode, &iolock, false);
        if (error)
                goto out_unlock;
 
Simple merge
Simple merge
Simple merge
Simple merge