| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 3/3] xfs: unlock the inode before log force in xfs_change_file_space |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sun, 18 Sep 2011 16:47:51 -0400 |
| References: | <20110918204748.547510183@xxxxxxxxxxxxxxxxxxxxxx> |
| User-agent: | quilt/0.48-1 |
Let the transaction commit unlock the inode before it potentially causes
a synchronous log force.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Index: xfs/fs/xfs/xfs_vnodeops.c
===================================================================
--- xfs.orig/fs/xfs/xfs_vnodeops.c 2011-09-18 11:41:41.000000000 -0400
+++ xfs/fs/xfs/xfs_vnodeops.c 2011-09-18 11:43:05.951778942 -0400
@@ -2342,8 +2342,7 @@ xfs_change_file_space(
}
xfs_ilock(ip, XFS_ILOCK_EXCL);
-
- xfs_trans_ijoin(tp, ip);
+ xfs_trans_ijoin_ref(tp, ip, XFS_ILOCK_EXCL);
if ((attr_flags & XFS_ATTR_DMI) == 0) {
ip->i_d.di_mode &= ~S_ISUID;
@@ -2368,10 +2367,5 @@ xfs_change_file_space(
xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
if (attr_flags & XFS_ATTR_SYNC)
xfs_trans_set_sync(tp);
-
- error = xfs_trans_commit(tp, 0);
-
- xfs_iunlock(ip, XFS_ILOCK_EXCL);
-
- return error;
+ return xfs_trans_commit(tp, 0);
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 2/3] xfs: unlock the inode before log force in xfs_fs_nfs_commit_metadata, Christoph Hellwig |
|---|---|
| Next by Date: | [PATCH 0/3] try to avoid locked inodes during log force, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 2/3] xfs: unlock the inode before log force in xfs_fs_nfs_commit_metadata, Alex Elder |
| Next by Thread: | Re: [PATCH 3/3] xfs: unlock the inode before log force in xfs_change_file_space, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |