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/ocfs2/ioctl.c | |
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/ocfs2/ioctl.c')
-rw-r--r-- | fs/ocfs2/ioctl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ocfs2/ioctl.c b/fs/ocfs2/ioctl.c index 16b0bb482ea7..4506ec5ec2ea 100644 --- a/fs/ocfs2/ioctl.c +++ b/fs/ocfs2/ioctl.c | |||
@@ -86,7 +86,7 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, | |||
86 | unsigned oldflags; | 86 | unsigned oldflags; |
87 | int status; | 87 | int status; |
88 | 88 | ||
89 | mutex_lock(&inode->i_mutex); | 89 | inode_lock(inode); |
90 | 90 | ||
91 | status = ocfs2_inode_lock(inode, &bh, 1); | 91 | status = ocfs2_inode_lock(inode, &bh, 1); |
92 | if (status < 0) { | 92 | if (status < 0) { |
@@ -135,7 +135,7 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags, | |||
135 | bail_unlock: | 135 | bail_unlock: |
136 | ocfs2_inode_unlock(inode, 1); | 136 | ocfs2_inode_unlock(inode, 1); |
137 | bail: | 137 | bail: |
138 | mutex_unlock(&inode->i_mutex); | 138 | inode_unlock(inode); |
139 | 139 | ||
140 | brelse(bh); | 140 | brelse(bh); |
141 | 141 | ||
@@ -287,7 +287,7 @@ static int ocfs2_info_scan_inode_alloc(struct ocfs2_super *osb, | |||
287 | struct ocfs2_dinode *dinode_alloc = NULL; | 287 | struct ocfs2_dinode *dinode_alloc = NULL; |
288 | 288 | ||
289 | if (inode_alloc) | 289 | if (inode_alloc) |
290 | mutex_lock(&inode_alloc->i_mutex); | 290 | inode_lock(inode_alloc); |
291 | 291 | ||
292 | if (o2info_coherent(&fi->ifi_req)) { | 292 | if (o2info_coherent(&fi->ifi_req)) { |
293 | status = ocfs2_inode_lock(inode_alloc, &bh, 0); | 293 | status = ocfs2_inode_lock(inode_alloc, &bh, 0); |
@@ -317,7 +317,7 @@ bail: | |||
317 | ocfs2_inode_unlock(inode_alloc, 0); | 317 | ocfs2_inode_unlock(inode_alloc, 0); |
318 | 318 | ||
319 | if (inode_alloc) | 319 | if (inode_alloc) |
320 | mutex_unlock(&inode_alloc->i_mutex); | 320 | inode_unlock(inode_alloc); |
321 | 321 | ||
322 | brelse(bh); | 322 | brelse(bh); |
323 | 323 | ||
@@ -547,7 +547,7 @@ static int ocfs2_info_freefrag_scan_bitmap(struct ocfs2_super *osb, | |||
547 | struct ocfs2_dinode *gb_dinode = NULL; | 547 | struct ocfs2_dinode *gb_dinode = NULL; |
548 | 548 | ||
549 | if (gb_inode) | 549 | if (gb_inode) |
550 | mutex_lock(&gb_inode->i_mutex); | 550 | inode_lock(gb_inode); |
551 | 551 | ||
552 | if (o2info_coherent(&ffg->iff_req)) { | 552 | if (o2info_coherent(&ffg->iff_req)) { |
553 | status = ocfs2_inode_lock(gb_inode, &bh, 0); | 553 | status = ocfs2_inode_lock(gb_inode, &bh, 0); |
@@ -604,7 +604,7 @@ bail: | |||
604 | ocfs2_inode_unlock(gb_inode, 0); | 604 | ocfs2_inode_unlock(gb_inode, 0); |
605 | 605 | ||
606 | if (gb_inode) | 606 | if (gb_inode) |
607 | mutex_unlock(&gb_inode->i_mutex); | 607 | inode_unlock(gb_inode); |
608 | 608 | ||
609 | iput(gb_inode); | 609 | iput(gb_inode); |
610 | brelse(bh); | 610 | brelse(bh); |