summaryrefslogtreecommitdiff
path: root/fs/aufs/xattr.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-09-11 04:34:46 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-09-11 04:34:46 -0300
commit863981e96738983919de841ec669e157e6bdaeb0 (patch)
treed6d89a12e7eb8017837c057935a2271290907f76 /fs/aufs/xattr.c
parent8dec7c70575785729a6a9e6719a955e9c545bcab (diff)
Linux-libre 4.7.1-gnupck-4.7.1-gnu
Diffstat (limited to 'fs/aufs/xattr.c')
-rw-r--r--fs/aufs/xattr.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/aufs/xattr.c b/fs/aufs/xattr.c
index 890c10795..2a148c993 100644
--- a/fs/aufs/xattr.c
+++ b/fs/aufs/xattr.c
@@ -163,10 +163,12 @@ int au_cpup_xattr(struct dentry *h_dst, struct dentry *h_src, int ignore_flags,
AuTraceErr(err);
}
- kfree(value);
+ if (value)
+ au_delayed_kfree(value);
out_free:
- kfree(o);
+ if (o)
+ au_delayed_kfree(o);
out:
if (!unlocked)
inode_unlock(h_isrc);
@@ -220,6 +222,7 @@ static ssize_t au_lgxattr(struct dentry *dentry, struct au_lgxattr *arg)
arg->u.list.list, arg->u.list.size);
break;
case AU_XATTR_GET:
+ AuDebugOn(d_is_negative(h_path.dentry));
err = vfs_getxattr(h_path.dentry,
arg->u.get.name, arg->u.get.value,
arg->u.get.size);
@@ -248,8 +251,8 @@ ssize_t aufs_listxattr(struct dentry *dentry, char *list, size_t size)
return au_lgxattr(dentry, &arg);
}
-ssize_t aufs_getxattr(struct dentry *dentry, const char *name, void *value,
- size_t size)
+ssize_t aufs_getxattr(struct dentry *dentry, struct inode *inode __maybe_unused,
+ const char *name, void *value, size_t size)
{
struct au_lgxattr arg = {
.type = AU_XATTR_GET,
@@ -263,8 +266,8 @@ ssize_t aufs_getxattr(struct dentry *dentry, const char *name, void *value,
return au_lgxattr(dentry, &arg);
}
-int aufs_setxattr(struct dentry *dentry, const char *name, const void *value,
- size_t size, int flags)
+int aufs_setxattr(struct dentry *dentry, struct inode *inode, const char *name,
+ const void *value, size_t size, int flags)
{
struct au_srxattr arg = {
.type = AU_XATTR_SET,
@@ -276,7 +279,7 @@ int aufs_setxattr(struct dentry *dentry, const char *name, const void *value,
},
};
- return au_srxattr(dentry, &arg);
+ return au_srxattr(dentry, inode, &arg);
}
int aufs_removexattr(struct dentry *dentry, const char *name)
@@ -288,7 +291,7 @@ int aufs_removexattr(struct dentry *dentry, const char *name)
},
};
- return au_srxattr(dentry, &arg);
+ return au_srxattr(dentry, d_inode(dentry), &arg);
}
/* ---------------------------------------------------------------------- */