vfs: mnt_drop_write_file()
new helper (wrapper around mnt_drop_write()) to be used in pair with mnt_want_write_file(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -397,7 +397,7 @@ SYSCALL_DEFINE5(fsetxattr, int, fd, const char __user *, name,
|
||||
error = mnt_want_write_file(f);
|
||||
if (!error) {
|
||||
error = setxattr(dentry, name, value, size, flags);
|
||||
mnt_drop_write(f->f_path.mnt);
|
||||
mnt_drop_write_file(f);
|
||||
}
|
||||
fput(f);
|
||||
return error;
|
||||
@@ -624,7 +624,7 @@ SYSCALL_DEFINE2(fremovexattr, int, fd, const char __user *, name)
|
||||
error = mnt_want_write_file(f);
|
||||
if (!error) {
|
||||
error = removexattr(dentry, name);
|
||||
mnt_drop_write(f->f_path.mnt);
|
||||
mnt_drop_write_file(f);
|
||||
}
|
||||
fput(f);
|
||||
return error;
|
||||
|
Reference in New Issue
Block a user