switch a bunch of places to mnt_want_write_file()

it's both faster (in case when file has been opened for write) and cleaner.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2011-11-23 11:57:51 -05:00
parent f47ec3f283
commit a561be7100
16 changed files with 42 additions and 42 deletions

View File

@@ -45,7 +45,7 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
if (get_user(flags, (int __user *) arg))
return -EFAULT;
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
return err;
@@ -150,7 +150,7 @@ flags_out:
if (!inode_owner_or_capable(inode))
return -EPERM;
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
return err;
if (get_user(generation, (int __user *) arg)) {
@@ -192,7 +192,7 @@ setversion_out:
return -EOPNOTSUPP;
}
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
return err;
@@ -240,7 +240,7 @@ setversion_out:
return -EOPNOTSUPP;
}
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
goto mext_out;
@@ -277,7 +277,7 @@ mext_out:
return -EOPNOTSUPP;
}
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
return err;
@@ -301,7 +301,7 @@ mext_out:
if (!inode_owner_or_capable(inode))
return -EACCES;
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
return err;
/*
@@ -323,7 +323,7 @@ mext_out:
if (!inode_owner_or_capable(inode))
return -EACCES;
err = mnt_want_write(filp->f_path.mnt);
err = mnt_want_write_file(filp);
if (err)
return err;
err = ext4_alloc_da_blocks(inode);