1 // SPDX-License-Identifier: GPL-2.0 << 2 /* 1 /* 3 * linux/fs/hfsplus/xattr_trusted.c 2 * linux/fs/hfsplus/xattr_trusted.c 4 * 3 * 5 * Vyacheslav Dubeyko <slava@dubeyko.com> 4 * Vyacheslav Dubeyko <slava@dubeyko.com> 6 * 5 * 7 * Handler for trusted extended attributes. 6 * Handler for trusted extended attributes. 8 */ 7 */ 9 8 10 #include <linux/nls.h> 9 #include <linux/nls.h> 11 10 12 #include "hfsplus_fs.h" 11 #include "hfsplus_fs.h" 13 #include "xattr.h" 12 #include "xattr.h" 14 13 15 static int hfsplus_trusted_getxattr(const stru 14 static int hfsplus_trusted_getxattr(const struct xattr_handler *handler, 16 struct den !! 15 struct dentry *dentry, const char *name, 17 const char !! 16 void *buffer, size_t size) 18 { 17 { 19 return hfsplus_getxattr(inode, name, b !! 18 return hfsplus_getxattr(dentry, name, buffer, size, 20 XATTR_TRUSTED_ 19 XATTR_TRUSTED_PREFIX, 21 XATTR_TRUSTED_ 20 XATTR_TRUSTED_PREFIX_LEN); 22 } 21 } 23 22 24 static int hfsplus_trusted_setxattr(const stru 23 static int hfsplus_trusted_setxattr(const struct xattr_handler *handler, 25 struct mnt !! 24 struct dentry *dentry, const char *name, 26 struct den !! 25 const void *buffer, size_t size, int flags) 27 const char << 28 size_t siz << 29 { 26 { 30 return hfsplus_setxattr(inode, name, b !! 27 return hfsplus_setxattr(dentry, name, buffer, size, flags, 31 XATTR_TRUSTED_ 28 XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN); 32 } 29 } 33 30 34 const struct xattr_handler hfsplus_xattr_trust 31 const struct xattr_handler hfsplus_xattr_trusted_handler = { 35 .prefix = XATTR_TRUSTED_PREFIX, 32 .prefix = XATTR_TRUSTED_PREFIX, 36 .get = hfsplus_trusted_getxattr, 33 .get = hfsplus_trusted_getxattr, 37 .set = hfsplus_trusted_setxattr, 34 .set = hfsplus_trusted_setxattr, 38 }; 35 }; 39 36
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.