vfs: Remove {get,set,remove}xattr inode operations
[cascardo/linux.git] / fs / f2fs / file.c
index 47abb96..2ebc4c7 100644 (file)
@@ -732,10 +732,7 @@ const struct inode_operations f2fs_file_inode_operations = {
        .get_acl        = f2fs_get_acl,
        .set_acl        = f2fs_set_acl,
 #ifdef CONFIG_F2FS_FS_XATTR
-       .setxattr       = generic_setxattr,
-       .getxattr       = generic_getxattr,
        .listxattr      = f2fs_listxattr,
-       .removexattr    = generic_removexattr,
 #endif
        .fiemap         = f2fs_fiemap,
 };
@@ -1757,21 +1754,14 @@ static int f2fs_ioc_set_encryption_policy(struct file *filp, unsigned long arg)
 {
        struct fscrypt_policy policy;
        struct inode *inode = file_inode(filp);
-       int ret;
 
        if (copy_from_user(&policy, (struct fscrypt_policy __user *)arg,
                                                        sizeof(policy)))
                return -EFAULT;
 
-       ret = mnt_want_write_file(filp);
-       if (ret)
-               return ret;
-
        f2fs_update_time(F2FS_I_SB(inode), REQ_TIME);
-       ret = fscrypt_process_policy(inode, &policy);
 
-       mnt_drop_write_file(filp);
-       return ret;
+       return fscrypt_process_policy(filp, &policy);
 }
 
 static int f2fs_ioc_get_encryption_policy(struct file *filp, unsigned long arg)