aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-18 16:47:50 -0400
committerAlex Elder <aelder@sgi.com>2011-10-11 22:15:08 -0400
commit8292d88c5c833fc8b837c3a018fd6d72c35a3231 (patch)
tree69d46f192c1aee634f4bab6cbf6b5891f4383a70 /fs/xfs
parentb10370585349d364ff3c550afa7922e6e21f029d (diff)
xfs: unlock the inode before log force in xfs_fs_nfs_commit_metadata
Only read the LSN we need to push to with the ilock held, and then release it before we do the log force to improve concurrency. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_export.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
index 75e5d322e48f..da108977b21f 100644
--- a/fs/xfs/xfs_export.c
+++ b/fs/xfs/xfs_export.c
@@ -229,16 +229,16 @@ xfs_fs_nfs_commit_metadata(
229{ 229{
230 struct xfs_inode *ip = XFS_I(inode); 230 struct xfs_inode *ip = XFS_I(inode);
231 struct xfs_mount *mp = ip->i_mount; 231 struct xfs_mount *mp = ip->i_mount;
232 int error = 0; 232 xfs_lsn_t lsn = 0;
233 233
234 xfs_ilock(ip, XFS_ILOCK_SHARED); 234 xfs_ilock(ip, XFS_ILOCK_SHARED);
235 if (xfs_ipincount(ip)) { 235 if (xfs_ipincount(ip))
236 error = _xfs_log_force_lsn(mp, ip->i_itemp->ili_last_lsn, 236 lsn = ip->i_itemp->ili_last_lsn;
237 XFS_LOG_SYNC, NULL);
238 }
239 xfs_iunlock(ip, XFS_ILOCK_SHARED); 237 xfs_iunlock(ip, XFS_ILOCK_SHARED);
240 238
241 return error; 239 if (!lsn)
240 return 0;
241 return _xfs_log_force_lsn(mp, lsn, XFS_LOG_SYNC, NULL);
242} 242}
243 243
244const struct export_operations xfs_export_operations = { 244const struct export_operations xfs_export_operations = {