Loading fs/ceph/xattr.c +14 −2 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ #define XATTR_CEPH_PREFIX "ceph." #define XATTR_CEPH_PREFIX_LEN (sizeof (XATTR_CEPH_PREFIX) - 1) static int __remove_xattr(struct ceph_inode_info *ci, struct ceph_inode_xattr *xattr); /* * List of handlers for synthetic system.* attributes. Other * attributes are handled directly. Loading Loading @@ -359,6 +362,12 @@ static int __set_xattr(struct ceph_inode_info *ci, kfree(val); return err; } if (update_xattr < 0) { if (xattr) __remove_xattr(ci, xattr); kfree(name); return 0; } } if (!xattr) { Loading Loading @@ -862,6 +871,9 @@ static int ceph_sync_setxattr(struct dentry *dentry, const char *name, dout("setxattr value=%.*s\n", (int)size, value); if (!value) flags |= CEPH_XATTR_REMOVE; /* do request */ req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETXATTR, USE_AUTH_MDS); Loading Loading @@ -965,8 +977,8 @@ int __ceph_setxattr(struct dentry *dentry, const char *name, goto retry; } err = __set_xattr(ci, newname, name_len, newval, val_len, flags, 1, &xattr); err = __set_xattr(ci, newname, name_len, newval, val_len, flags, value ? 1 : -1, &xattr); if (!err) { dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL); Loading include/linux/ceph/ceph_fs.h +3 −2 Original line number Diff line number Diff line Loading @@ -373,8 +373,9 @@ extern const char *ceph_mds_op_name(int op); /* * Ceph setxattr request flags. */ #define CEPH_XATTR_CREATE 1 #define CEPH_XATTR_REPLACE 2 #define CEPH_XATTR_CREATE (1 << 0) #define CEPH_XATTR_REPLACE (1 << 1) #define CEPH_XATTR_REMOVE (1 << 31) union ceph_mds_request_args { struct { Loading Loading
fs/ceph/xattr.c +14 −2 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ #define XATTR_CEPH_PREFIX "ceph." #define XATTR_CEPH_PREFIX_LEN (sizeof (XATTR_CEPH_PREFIX) - 1) static int __remove_xattr(struct ceph_inode_info *ci, struct ceph_inode_xattr *xattr); /* * List of handlers for synthetic system.* attributes. Other * attributes are handled directly. Loading Loading @@ -359,6 +362,12 @@ static int __set_xattr(struct ceph_inode_info *ci, kfree(val); return err; } if (update_xattr < 0) { if (xattr) __remove_xattr(ci, xattr); kfree(name); return 0; } } if (!xattr) { Loading Loading @@ -862,6 +871,9 @@ static int ceph_sync_setxattr(struct dentry *dentry, const char *name, dout("setxattr value=%.*s\n", (int)size, value); if (!value) flags |= CEPH_XATTR_REMOVE; /* do request */ req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_SETXATTR, USE_AUTH_MDS); Loading Loading @@ -965,8 +977,8 @@ int __ceph_setxattr(struct dentry *dentry, const char *name, goto retry; } err = __set_xattr(ci, newname, name_len, newval, val_len, flags, 1, &xattr); err = __set_xattr(ci, newname, name_len, newval, val_len, flags, value ? 1 : -1, &xattr); if (!err) { dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL); Loading
include/linux/ceph/ceph_fs.h +3 −2 Original line number Diff line number Diff line Loading @@ -373,8 +373,9 @@ extern const char *ceph_mds_op_name(int op); /* * Ceph setxattr request flags. */ #define CEPH_XATTR_CREATE 1 #define CEPH_XATTR_REPLACE 2 #define CEPH_XATTR_CREATE (1 << 0) #define CEPH_XATTR_REPLACE (1 << 1) #define CEPH_XATTR_REMOVE (1 << 31) union ceph_mds_request_args { struct { Loading