switch xattr_handler->set() to passing dentry and inode separately
[cascardo/linux.git] / fs / f2fs / xattr.c
index 00ea567..e3decae 100644 (file)
@@ -50,10 +50,11 @@ static int f2fs_xattr_generic_get(const struct xattr_handler *handler,
 }
 
 static int f2fs_xattr_generic_set(const struct xattr_handler *handler,
-               struct dentry *dentry, const char *name, const void *value,
+               struct dentry *unused, struct inode *inode,
+               const char *name, const void *value,
                size_t size, int flags)
 {
-       struct f2fs_sb_info *sbi = F2FS_SB(dentry->d_sb);
+       struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
 
        switch (handler->flags) {
        case F2FS_XATTR_INDEX_USER:
@@ -69,7 +70,7 @@ static int f2fs_xattr_generic_set(const struct xattr_handler *handler,
        default:
                return -EINVAL;
        }
-       return f2fs_setxattr(d_inode(dentry), handler->flags, name,
+       return f2fs_setxattr(inode, handler->flags, name,
                                        value, size, NULL, flags);
 }
 
@@ -95,11 +96,10 @@ static int f2fs_xattr_advise_get(const struct xattr_handler *handler,
 }
 
 static int f2fs_xattr_advise_set(const struct xattr_handler *handler,
-               struct dentry *dentry, const char *name, const void *value,
+               struct dentry *unused, struct inode *inode,
+               const char *name, const void *value,
                size_t size, int flags)
 {
-       struct inode *inode = d_inode(dentry);
-
        if (!inode_owner_or_capable(inode))
                return -EPERM;
        if (value == NULL)