|
|
@@ -742,6 +742,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
|
|
|
int issued, new_issued, info_caps;
|
|
|
struct timespec64 mtime, atime, ctime;
|
|
|
struct ceph_buffer *xattr_blob = NULL;
|
|
|
+ struct ceph_buffer *old_blob = NULL;
|
|
|
struct ceph_string *pool_ns = NULL;
|
|
|
struct ceph_cap *new_cap = NULL;
|
|
|
int err = 0;
|
|
|
@@ -878,7 +879,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
|
|
|
if ((ci->i_xattrs.version == 0 || !(issued & CEPH_CAP_XATTR_EXCL)) &&
|
|
|
le64_to_cpu(info->xattr_version) > ci->i_xattrs.version) {
|
|
|
if (ci->i_xattrs.blob)
|
|
|
- ceph_buffer_put(ci->i_xattrs.blob);
|
|
|
+ old_blob = ci->i_xattrs.blob;
|
|
|
ci->i_xattrs.blob = xattr_blob;
|
|
|
if (xattr_blob)
|
|
|
memcpy(ci->i_xattrs.blob->vec.iov_base,
|
|
|
@@ -1017,8 +1018,8 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
|
|
|
out:
|
|
|
if (new_cap)
|
|
|
ceph_put_cap(mdsc, new_cap);
|
|
|
- if (xattr_blob)
|
|
|
- ceph_buffer_put(xattr_blob);
|
|
|
+ ceph_buffer_put(old_blob);
|
|
|
+ ceph_buffer_put(xattr_blob);
|
|
|
ceph_put_string(pool_ns);
|
|
|
return err;
|
|
|
}
|