summaryrefslogtreecommitdiff
path: root/fs/f2fs/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/acl.c')
-rw-r--r--fs/f2fs/acl.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 1ac9a4b24f6e..fed74d193ffb 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -412,54 +412,3 @@ const struct xattr_handler f2fs_xattr_acl_access_handler = {
.get = f2fs_xattr_get_acl,
.set = f2fs_xattr_set_acl,
};
-
-static size_t f2fs_xattr_advise_list(struct dentry *dentry, char *list,
- size_t list_size, const char *name, size_t name_len, int type)
-{
- const char *xname = F2FS_SYSTEM_ADVISE_PREFIX;
- size_t size;
-
- if (type != F2FS_XATTR_INDEX_ADVISE)
- return 0;
-
- size = strlen(xname) + 1;
- if (list && size <= list_size)
- memcpy(list, xname, size);
- return size;
-}
-
-static int f2fs_xattr_advise_get(struct dentry *dentry, const char *name,
- void *buffer, size_t size, int type)
-{
- struct inode *inode = dentry->d_inode;
-
- if (strcmp(name, "") != 0)
- return -EINVAL;
-
- *((char *)buffer) = F2FS_I(inode)->i_advise;
- return sizeof(char);
-}
-
-static int f2fs_xattr_advise_set(struct dentry *dentry, const char *name,
- const void *value, size_t size, int flags, int type)
-{
- struct inode *inode = dentry->d_inode;
-
- if (strcmp(name, "") != 0)
- return -EINVAL;
- if (!inode_owner_or_capable(inode))
- return -EPERM;
- if (value == NULL)
- return -EINVAL;
-
- F2FS_I(inode)->i_advise |= *(char *)value;
- return 0;
-}
-
-const struct xattr_handler f2fs_xattr_advise_handler = {
- .prefix = F2FS_SYSTEM_ADVISE_PREFIX,
- .flags = F2FS_XATTR_INDEX_ADVISE,
- .list = f2fs_xattr_advise_list,
- .get = f2fs_xattr_advise_get,
- .set = f2fs_xattr_advise_set,
-};