mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 01:21:58 +00:00
Merge branch 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs xattr updates from Al Viro: "xattr stuff from Andreas This completes the switch to xattr_handler ->get()/->set() from ->getxattr/->setxattr/->removexattr" * 'work.xattr' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: vfs: Remove {get,set,remove}xattr inode operations xattr: Stop calling {get,set,remove}xattr inode operations vfs: Check for the IOP_XATTR flag in listxattr xattr: Add __vfs_{get,set,remove}xattr helpers libfs: Use IOP_XATTR flag for empty directory handling vfs: Use IOP_XATTR flag for bad-inode handling vfs: Add IOP_XATTR inode operations flag vfs: Move xattr_resolve_name to the front of fs/xattr.c ecryptfs: Switch to generic xattr handlers sockfs: Get rid of getxattr iop sockfs: getxattr: Fail with -EOPNOTSUPP for invalid attribute names kernfs: Switch to generic xattr handlers hfs: Switch to generic xattr handlers jffs2: Remove jffs2_{get,set,remove}xattr macros xattr: Remove unnecessary NULL attribute name check
This commit is contained in:
commit
97d2116708
80 changed files with 471 additions and 687 deletions
29
fs/libfs.c
29
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)
|
||||
{
|
||||
|
@ -1149,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;
|
||||
|
@ -1177,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,
|
||||
};
|
||||
|
||||
|
@ -1215,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue