@@ -132,7 +132,7 @@ static void cachefiles_update_object(struct cachefiles_object *object)
cache = container_of(object->cache, struct cachefiles_cache, cache);
cachefiles_begin_secure(cache, &saved_cred);
- cachefiles_set_object_xattr(object, XATTR_REPLACE);
+ cachefiles_set_object_xattr(object);
cachefiles_end_secure(cache, saved_cred);
_leave("");
}
@@ -162,8 +162,7 @@ static inline void cachefiles_end_secure(struct cachefiles_cache *cache,
/*
* xattr.c
*/
-extern int cachefiles_set_object_xattr(struct cachefiles_object *object,
- unsigned int xattr_flags);
+extern int cachefiles_set_object_xattr(struct cachefiles_object *object);
extern int cachefiles_check_auxdata(struct cachefiles_object *object);
extern int cachefiles_remove_object_xattr(struct cachefiles_cache *cache,
struct dentry *dentry);
@@ -291,7 +291,7 @@ static int cachefiles_check_open_object(struct cachefiles_cache *cache,
if (object->new) {
/* attach data to a newly constructed terminal object */
- ret = cachefiles_set_object_xattr(object, XATTR_CREATE);
+ ret = cachefiles_set_object_xattr(object);
if (ret < 0)
goto error_unmark;
} else {
@@ -26,8 +26,7 @@ static const char cachefiles_xattr_cache[] =
/*
* set the state xattr on a cache file
*/
-int cachefiles_set_object_xattr(struct cachefiles_object *object,
- unsigned int xattr_flags)
+int cachefiles_set_object_xattr(struct cachefiles_object *object)
{
struct cachefiles_xattr *buf;
struct dentry *dentry;
@@ -51,8 +50,7 @@ int cachefiles_set_object_xattr(struct cachefiles_object *object,
clear_bit(FSCACHE_COOKIE_AUX_UPDATED, &object->cookie->flags);
ret = vfs_setxattr(&init_user_ns, dentry, cachefiles_xattr_cache,
- buf, sizeof(struct cachefiles_xattr) + len,
- xattr_flags);
+ buf, sizeof(struct cachefiles_xattr) + len, 0);
if (ret < 0) {
trace_cachefiles_coherency(object, file_inode(file)->i_ino,
0,
Don't pass XATTR_CREATE/XATTR_REPLACE to vfs_setxattr(); just pass 0 as we don't want to have to deal with the error or try to guess which we want to use. Signed-off-by: David Howells <dhowells@redhat.com> --- fs/cachefiles/interface.c | 2 +- fs/cachefiles/internal.h | 3 +-- fs/cachefiles/namei.c | 2 +- fs/cachefiles/xattr.c | 6 ++---- 4 files changed, 5 insertions(+), 8 deletions(-)