aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/ioctl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-22 15:40:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2016-01-22 18:04:28 -0500
commit5955102c9984fa081b2d570cfac75c97eecf8f3b (patch)
treea4744386eac4b916e847eb4eedfada158f6527b4 /fs/jfs/ioctl.c
parent57b8f112cfe6622ddddb8c2641206bb5fa8a112d (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/jfs/ioctl.c')
-rw-r--r--fs/jfs/ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c
index 8db8b7d61e40..8653cac7e12e 100644
--- a/fs/jfs/ioctl.c
+++ b/fs/jfs/ioctl.c
@@ -96,7 +96,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
96 } 96 }
97 97
98 /* Lock against other parallel changes of flags */ 98 /* Lock against other parallel changes of flags */
99 mutex_lock(&inode->i_mutex); 99 inode_lock(inode);
100 100
101 jfs_get_inode_flags(jfs_inode); 101 jfs_get_inode_flags(jfs_inode);
102 oldflags = jfs_inode->mode2; 102 oldflags = jfs_inode->mode2;
@@ -109,7 +109,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
109 ((flags ^ oldflags) & 109 ((flags ^ oldflags) &
110 (JFS_APPEND_FL | JFS_IMMUTABLE_FL))) { 110 (JFS_APPEND_FL | JFS_IMMUTABLE_FL))) {
111 if (!capable(CAP_LINUX_IMMUTABLE)) { 111 if (!capable(CAP_LINUX_IMMUTABLE)) {
112 mutex_unlock(&inode->i_mutex); 112 inode_unlock(inode);
113 err = -EPERM; 113 err = -EPERM;
114 goto setflags_out; 114 goto setflags_out;
115 } 115 }
@@ -120,7 +120,7 @@ long jfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
120 jfs_inode->mode2 = flags; 120 jfs_inode->mode2 = flags;
121 121
122 jfs_set_inode_flags(inode); 122 jfs_set_inode_flags(inode);
123 mutex_unlock(&inode->i_mutex); 123 inode_unlock(inode);
124 inode->i_ctime = CURRENT_TIME_SEC; 124 inode->i_ctime = CURRENT_TIME_SEC;
125 mark_inode_dirty(inode); 125 mark_inode_dirty(inode);
126setflags_out: 126setflags_out: