From: Jan Kara Date: Wed, 20 Apr 2011 18:30:40 +0000 (+0200) Subject: vfs: Pass setxattr(2) flags properly X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=df7e130384efd1c732aa08648dad46687fee3d96;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git vfs: Pass setxattr(2) flags properly For some reason generic_setxattr() did not pass flags (XATTR_CREATE, XATTR_REPLACE) to the filesystem specific helper. This caused that setxattr(2) syscall just ignored these flags. Fix the bug by passing flags correctly. Signed-off-by: Jan Kara Acked-by: Christoph Hellwig Signed-off-by: Linus Torvalds --- diff --git a/fs/xattr.c b/fs/xattr.c index a19acdb81cd..f1ef94974de 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -666,7 +666,7 @@ generic_setxattr(struct dentry *dentry, const char *name, const void *value, siz handler = xattr_resolve_name(dentry->d_sb->s_xattr, &name); if (!handler) return -EOPNOTSUPP; - return handler->set(dentry, name, value, size, 0, handler->flags); + return handler->set(dentry, name, value, size, flags, handler->flags); } /*