diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-22 15:40:57 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-22 18:04:28 -0500 |
commit | 5955102c9984fa081b2d570cfac75c97eecf8f3b (patch) | |
tree | a4744386eac4b916e847eb4eedfada158f6527b4 /fs/xfs | |
parent | 57b8f112cfe6622ddddb8c2641206bb5fa8a112d (diff) |
wrappers for ->i_mutex access
parallel to mutex_{lock,unlock,trylock,is_locked,lock_nested},
inode_foo(inode) being mutex_foo(&inode->i_mutex).
Please, use those for access to ->i_mutex; over the coming cycle
->i_mutex will become rwsem, with ->lookup() done with it held
only shared.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_file.c | 6 | ||||
-rw-r--r-- | fs/xfs/xfs_pnfs.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c index ebe9b8290a70..bb2b8f354041 100644 --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c | |||
@@ -55,7 +55,7 @@ xfs_rw_ilock( | |||
55 | int type) | 55 | int type) |
56 | { | 56 | { |
57 | if (type & XFS_IOLOCK_EXCL) | 57 | if (type & XFS_IOLOCK_EXCL) |
58 | mutex_lock(&VFS_I(ip)->i_mutex); | 58 | inode_lock(VFS_I(ip)); |
59 | xfs_ilock(ip, type); | 59 | xfs_ilock(ip, type); |
60 | } | 60 | } |
61 | 61 | ||
@@ -66,7 +66,7 @@ xfs_rw_iunlock( | |||
66 | { | 66 | { |
67 | xfs_iunlock(ip, type); | 67 | xfs_iunlock(ip, type); |
68 | if (type & XFS_IOLOCK_EXCL) | 68 | if (type & XFS_IOLOCK_EXCL) |
69 | mutex_unlock(&VFS_I(ip)->i_mutex); | 69 | inode_unlock(VFS_I(ip)); |
70 | } | 70 | } |
71 | 71 | ||
72 | static inline void | 72 | static inline void |
@@ -76,7 +76,7 @@ xfs_rw_ilock_demote( | |||
76 | { | 76 | { |
77 | xfs_ilock_demote(ip, type); | 77 | xfs_ilock_demote(ip, type); |
78 | if (type & XFS_IOLOCK_EXCL) | 78 | if (type & XFS_IOLOCK_EXCL) |
79 | mutex_unlock(&VFS_I(ip)->i_mutex); | 79 | inode_unlock(VFS_I(ip)); |
80 | } | 80 | } |
81 | 81 | ||
82 | /* | 82 | /* |
diff --git a/fs/xfs/xfs_pnfs.c b/fs/xfs/xfs_pnfs.c index dc6221942b85..ade236e90bb3 100644 --- a/fs/xfs/xfs_pnfs.c +++ b/fs/xfs/xfs_pnfs.c | |||
@@ -42,11 +42,11 @@ xfs_break_layouts( | |||
42 | while ((error = break_layout(inode, false) == -EWOULDBLOCK)) { | 42 | while ((error = break_layout(inode, false) == -EWOULDBLOCK)) { |
43 | xfs_iunlock(ip, *iolock); | 43 | xfs_iunlock(ip, *iolock); |
44 | if (with_imutex && (*iolock & XFS_IOLOCK_EXCL)) | 44 | if (with_imutex && (*iolock & XFS_IOLOCK_EXCL)) |
45 | mutex_unlock(&inode->i_mutex); | 45 | inode_unlock(inode); |
46 | error = break_layout(inode, true); | 46 | error = break_layout(inode, true); |
47 | *iolock = XFS_IOLOCK_EXCL; | 47 | *iolock = XFS_IOLOCK_EXCL; |
48 | if (with_imutex) | 48 | if (with_imutex) |
49 | mutex_lock(&inode->i_mutex); | 49 | inode_lock(inode); |
50 | xfs_ilock(ip, *iolock); | 50 | xfs_ilock(ip, *iolock); |
51 | } | 51 | } |
52 | 52 | ||