summaryrefslogtreecommitdiffstats
path: root/fs/libfs.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2016-09-29 17:48:41 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-10-07 20:10:43 -0400
commitf5c244383725a6de06bc62fa7c54c0ea0d942eec (patch)
treef88b5e7494daf74e3871648fd72e8fe9ef2fb31f /fs/libfs.c
parent5f6e59ae8277cef221fdbf9b12f0c4f80db59944 (diff)
downloadop-kernel-dev-f5c244383725a6de06bc62fa7c54c0ea0d942eec.zip
op-kernel-dev-f5c244383725a6de06bc62fa7c54c0ea0d942eec.tar.gz
libfs: Use IOP_XATTR flag for empty directory handling
Instead of special xattr inode operations, use the IOP_XATTR inode operations flag for the special libfs empty directories. 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.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index cfa9576..b322d75 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -1150,24 +1150,6 @@ static int empty_dir_setattr(struct dentry *dentry, struct iattr *attr)
return -EPERM;
}
-static int empty_dir_setxattr(struct dentry *dentry, struct inode *inode,
- const char *name, const void *value,
- size_t size, int flags)
-{
- return -EOPNOTSUPP;
-}
-
-static ssize_t empty_dir_getxattr(struct dentry *dentry, struct inode *inode,
- const char *name, void *value, size_t size)
-{
- return -EOPNOTSUPP;
-}
-
-static int empty_dir_removexattr(struct dentry *dentry, const char *name)
-{
- return -EOPNOTSUPP;
-}
-
static ssize_t empty_dir_listxattr(struct dentry *dentry, char *list, size_t size)
{
return -EOPNOTSUPP;
@@ -1178,9 +1160,6 @@ static const struct inode_operations empty_dir_inode_operations = {
.permission = generic_permission,
.setattr = empty_dir_setattr,
.getattr = empty_dir_getattr,
- .setxattr = empty_dir_setxattr,
- .getxattr = empty_dir_getxattr,
- .removexattr = empty_dir_removexattr,
.listxattr = empty_dir_listxattr,
};
@@ -1216,6 +1195,7 @@ void make_empty_dir_inode(struct inode *inode)
inode->i_blocks = 0;
inode->i_op = &empty_dir_inode_operations;
+ inode->i_opflags &= ~IOP_XATTR;
inode->i_fop = &empty_dir_operations;
}
OpenPOWER on IntegriCloud