summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-12 06:41:01 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-03 01:47:22 +0200
commit7b9743eb8932cee1bc646725a6364ccb29d86a2c (patch)
tree19ca981c2f2aeccef3eb07b30a9852d2b787ec37 /fs/ocfs2
parentconfigfs_detach_prep(): make sure that wait_mutex won't go away (diff)
downloadlinux-7b9743eb8932cee1bc646725a6364ccb29d86a2c.tar.xz
linux-7b9743eb8932cee1bc646725a6364ccb29d86a2c.zip
ocfs2: don't open-code inode_lock/inode_unlock
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/aops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index ad1577348a92..abb0b0bf7c7f 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -2311,7 +2311,7 @@ static void ocfs2_dio_end_io_write(struct inode *inode,
/* ocfs2_file_write_iter will get i_mutex, so we need not lock if we
* are in that context. */
if (dwc->dw_writer_pid != task_pid_nr(current)) {
- mutex_lock(&inode->i_mutex);
+ inode_lock(inode);
locked = 1;
}
@@ -2390,7 +2390,7 @@ out:
ocfs2_free_alloc_context(meta_ac);
ocfs2_run_deallocs(osb, &dealloc);
if (locked)
- mutex_unlock(&inode->i_mutex);
+ inode_unlock(inode);
ocfs2_dio_free_write_ctx(inode, dwc);
}