]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/reiserfs/xattr_security.c
Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
[karo-tx-linux.git] / fs / reiserfs / xattr_security.c
index ab0217d320396447110e0d8d3218d22b69046352..86aeb9dd805a9189073fe4e605d01d8103da36c4 100644 (file)
@@ -9,29 +9,26 @@
 #include <linux/uaccess.h>
 
 static int
-security_get(const struct xattr_handler *handler, struct dentry *dentry,
-            const char *name, void *buffer, size_t size)
+security_get(const struct xattr_handler *handler, struct dentry *unused,
+            struct inode *inode, const char *name, void *buffer, size_t size)
 {
-       if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
-               return -EINVAL;
-
-       if (IS_PRIVATE(d_inode(dentry)))
+       if (IS_PRIVATE(inode))
                return -EPERM;
 
-       return reiserfs_xattr_get(d_inode(dentry), name, buffer, size);
+       return reiserfs_xattr_get(inode, xattr_full_name(handler, name),
+                                 buffer, size);
 }
 
 static int
 security_set(const struct xattr_handler *handler, struct dentry *dentry,
             const char *name, const void *buffer, size_t size, int flags)
 {
-       if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
-               return -EINVAL;
-
        if (IS_PRIVATE(d_inode(dentry)))
                return -EPERM;
 
-       return reiserfs_xattr_set(d_inode(dentry), name, buffer, size, flags);
+       return reiserfs_xattr_set(d_inode(dentry),
+                                 xattr_full_name(handler, name),
+                                 buffer, size, flags);
 }
 
 static bool security_list(struct dentry *dentry)