aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/ioctl.c')
-rw-r--r--fs/nilfs2/ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index 06658caa18bd..0b6387c67e6c 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -182,7 +182,7 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp,
182 if (copy_from_user(&cpmode, argp, sizeof(cpmode))) 182 if (copy_from_user(&cpmode, argp, sizeof(cpmode)))
183 goto out; 183 goto out;
184 184
185 down_read(&inode->i_sb->s_umount); 185 mutex_lock(&nilfs->ns_snapshot_mount_mutex);
186 186
187 nilfs_transaction_begin(inode->i_sb, &ti, 0); 187 nilfs_transaction_begin(inode->i_sb, &ti, 0);
188 ret = nilfs_cpfile_change_cpmode( 188 ret = nilfs_cpfile_change_cpmode(
@@ -192,7 +192,7 @@ static int nilfs_ioctl_change_cpmode(struct inode *inode, struct file *filp,
192 else 192 else
193 nilfs_transaction_commit(inode->i_sb); /* never fails */ 193 nilfs_transaction_commit(inode->i_sb); /* never fails */
194 194
195 up_read(&inode->i_sb->s_umount); 195 mutex_unlock(&nilfs->ns_snapshot_mount_mutex);
196out: 196out:
197 mnt_drop_write_file(filp); 197 mnt_drop_write_file(filp);
198 return ret; 198 return ret;