diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2016-09-29 17:48:35 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-10-06 22:17:38 -0400 |
commit | bba0bd31b117cba754322f337e61def53d9b22e5 (patch) | |
tree | 3f7375e4de89f61828f65c18f34359be80199f8d /fs/libfs.c | |
parent | 971df15bd54ad46e907046ff33750a137b2f0096 (diff) | |
download | linux-bba0bd31b117cba754322f337e61def53d9b22e5.tar.gz linux-bba0bd31b117cba754322f337e61def53d9b22e5.tar.bz2 linux-bba0bd31b117cba754322f337e61def53d9b22e5.zip |
sockfs: Get rid of getxattr iop
If we allow pseudo-filesystems created with mount_pseudo to have xattr
handlers, we can replace sockfs_getxattr with a sockfs_xattr_get handler
to use the xattr handler name parsing.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 74dc8b9e7f53..cfa9576ea886 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -236,8 +236,8 @@ static const struct super_operations simple_super_operations = { * Common helper for pseudo-filesystems (sockfs, pipefs, bdev - stuff that * will never be mountable) */ -struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name, - const struct super_operations *ops, +struct dentry *mount_pseudo_xattr(struct file_system_type *fs_type, char *name, + const struct super_operations *ops, const struct xattr_handler **xattr, const struct dentry_operations *dops, unsigned long magic) { struct super_block *s; @@ -254,6 +254,7 @@ struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name, s->s_blocksize_bits = PAGE_SHIFT; s->s_magic = magic; s->s_op = ops ? ops : &simple_super_operations; + s->s_xattr = xattr; s->s_time_gran = 1; root = new_inode(s); if (!root) @@ -281,7 +282,7 @@ Enomem: deactivate_locked_super(s); return ERR_PTR(-ENOMEM); } -EXPORT_SYMBOL(mount_pseudo); +EXPORT_SYMBOL(mount_pseudo_xattr); int simple_open(struct inode *inode, struct file *file) { |