switch xattr_handler->set() to passing dentry and inode separately
[cascardo/linux.git] / fs / ocfs2 / xattr.c
index ad16995..d205385 100644 (file)
@@ -7254,10 +7254,11 @@ static int ocfs2_xattr_security_get(const struct xattr_handler *handler,
 }
 
 static int ocfs2_xattr_security_set(const struct xattr_handler *handler,
-                                   struct dentry *dentry, const char *name,
-                                   const void *value, size_t size, int flags)
+                                   struct dentry *unused, struct inode *inode,
+                                   const char *name, const void *value,
+                                   size_t size, int flags)
 {
-       return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_SECURITY,
+       return ocfs2_xattr_set(inode, OCFS2_XATTR_INDEX_SECURITY,
                               name, value, size, flags);
 }
 
@@ -7325,10 +7326,11 @@ static int ocfs2_xattr_trusted_get(const struct xattr_handler *handler,
 }
 
 static int ocfs2_xattr_trusted_set(const struct xattr_handler *handler,
-                                  struct dentry *dentry, const char *name,
-                                  const void *value, size_t size, int flags)
+                                  struct dentry *unused, struct inode *inode,
+                                  const char *name, const void *value,
+                                  size_t size, int flags)
 {
-       return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_TRUSTED,
+       return ocfs2_xattr_set(inode, OCFS2_XATTR_INDEX_TRUSTED,
                               name, value, size, flags);
 }
 
@@ -7354,15 +7356,16 @@ static int ocfs2_xattr_user_get(const struct xattr_handler *handler,
 }
 
 static int ocfs2_xattr_user_set(const struct xattr_handler *handler,
-                               struct dentry *dentry, const char *name,
-                               const void *value, size_t size, int flags)
+                               struct dentry *unused, struct inode *inode,
+                               const char *name, const void *value,
+                               size_t size, int flags)
 {
-       struct ocfs2_super *osb = OCFS2_SB(dentry->d_sb);
+       struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
 
        if (osb->s_mount_opt & OCFS2_MOUNT_NOUSERXATTR)
                return -EOPNOTSUPP;
 
-       return ocfs2_xattr_set(d_inode(dentry), OCFS2_XATTR_INDEX_USER,
+       return ocfs2_xattr_set(inode, OCFS2_XATTR_INDEX_USER,
                               name, value, size, flags);
 }