diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-04-22 12:11:38 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-23 15:33:03 -0400 |
commit | a9ae008f407b50fc92ef19588d2ea2be13a7f5e2 (patch) | |
tree | 7899c9ed55e51abad0cfda73a36db431a7bea532 /fs/cifs/cifsfs.h | |
parent | 534bb0c7bdaf7377e84e82f0eb4a9992eaa87fbb (diff) | |
download | op-kernel-dev-a9ae008f407b50fc92ef19588d2ea2be13a7f5e2.zip op-kernel-dev-a9ae008f407b50fc92ef19588d2ea2be13a7f5e2.tar.gz |
cifs: Switch to generic xattr handlers
Use xattr handlers for resolving attribute names. The amount of setup
code required on cifs is nontrivial, so use the same get and set
functions for all handlers, with switch statements for the different
types of attributes in them.
The set_EA handler can handle NULL values, so we don't need a separate
removexattr function anymore. Remove the cifs_dbg statements related to
xattr name resolution; they don't add much. Don't build xattr.o when
CONFIG_CIFS_XATTR is not defined.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cifs/cifsfs.h')
-rw-r--r-- | fs/cifs/cifsfs.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index c89ecd7..c1e749a 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h @@ -120,11 +120,15 @@ extern const char *cifs_get_link(struct dentry *, struct inode *, struct delayed_call *); extern int cifs_symlink(struct inode *inode, struct dentry *direntry, const char *symname); -extern int cifs_removexattr(struct dentry *, const char *); -extern int cifs_setxattr(struct dentry *, const char *, const void *, - size_t, int); -extern ssize_t cifs_getxattr(struct dentry *, struct inode *, const char *, void *, size_t); + +#ifdef CONFIG_CIFS_XATTR +extern const struct xattr_handler *cifs_xattr_handlers[]; extern ssize_t cifs_listxattr(struct dentry *, char *, size_t); +#else +# define cifs_xattr_handlers NULL +# define cifs_listxattr NULL +#endif + extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg); #ifdef CONFIG_CIFS_NFSD_EXPORT extern const struct export_operations cifs_export_ops; |