|
|
@@ -1280,6 +1280,7 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
|
|
|
{
|
|
|
struct ceph_inode_info *ci = cap->ci;
|
|
|
struct inode *inode = &ci->vfs_inode;
|
|
|
+ struct ceph_buffer *old_blob = NULL;
|
|
|
struct cap_msg_args arg;
|
|
|
int held, revoking;
|
|
|
int wake = 0;
|
|
|
@@ -1344,7 +1345,7 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
|
|
|
ci->i_requested_max_size = arg.max_size;
|
|
|
|
|
|
if (flushing & CEPH_CAP_XATTR_EXCL) {
|
|
|
- __ceph_build_xattrs_blob(ci);
|
|
|
+ old_blob = __ceph_build_xattrs_blob(ci);
|
|
|
arg.xattr_version = ci->i_xattrs.version;
|
|
|
arg.xattr_buf = ci->i_xattrs.blob;
|
|
|
} else {
|
|
|
@@ -1379,6 +1380,8 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
|
|
|
|
|
|
spin_unlock(&ci->i_ceph_lock);
|
|
|
|
|
|
+ ceph_buffer_put(old_blob);
|
|
|
+
|
|
|
ret = send_cap_msg(&arg);
|
|
|
if (ret < 0) {
|
|
|
dout("error sending cap msg, must requeue %p\n", inode);
|