mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
switch xattr_handler->set() to passing dentry and inode separately
preparation for similar switch in ->setxattr() (see the next commit for rationale). Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
002354112f
commit
5930122683
34 changed files with 156 additions and 135 deletions
|
|
@ -50,10 +50,11 @@ static int f2fs_xattr_generic_get(const struct xattr_handler *handler,
|
|||
}
|
||||
|
||||
static int f2fs_xattr_generic_set(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, const char *name, const void *value,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
{
|
||||
struct f2fs_sb_info *sbi = F2FS_SB(dentry->d_sb);
|
||||
struct f2fs_sb_info *sbi = F2FS_SB(inode->i_sb);
|
||||
|
||||
switch (handler->flags) {
|
||||
case F2FS_XATTR_INDEX_USER:
|
||||
|
|
@ -69,7 +70,7 @@ static int f2fs_xattr_generic_set(const struct xattr_handler *handler,
|
|||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
return f2fs_setxattr(d_inode(dentry), handler->flags, name,
|
||||
return f2fs_setxattr(inode, handler->flags, name,
|
||||
value, size, NULL, flags);
|
||||
}
|
||||
|
||||
|
|
@ -95,11 +96,10 @@ static int f2fs_xattr_advise_get(const struct xattr_handler *handler,
|
|||
}
|
||||
|
||||
static int f2fs_xattr_advise_set(const struct xattr_handler *handler,
|
||||
struct dentry *dentry, const char *name, const void *value,
|
||||
struct dentry *unused, struct inode *inode,
|
||||
const char *name, const void *value,
|
||||
size_t size, int flags)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
|
||||
if (!inode_owner_or_capable(inode))
|
||||
return -EPERM;
|
||||
if (value == NULL)
|
||||
|
|
|
|||
Loading…
Reference in a new issue