@@ -741,6 +741,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
741
741
int issued = 0 , implemented , new_issued ;
742
742
struct timespec mtime , atime , ctime ;
743
743
struct ceph_buffer * xattr_blob = NULL ;
744
+ struct ceph_buffer * old_blob = NULL ;
744
745
struct ceph_string * pool_ns = NULL ;
745
746
struct ceph_cap * new_cap = NULL ;
746
747
int err = 0 ;
@@ -858,7 +859,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
858
859
if ((ci -> i_xattrs .version == 0 || !(issued & CEPH_CAP_XATTR_EXCL )) &&
859
860
le64_to_cpu (info -> xattr_version ) > ci -> i_xattrs .version ) {
860
861
if (ci -> i_xattrs .blob )
861
- ceph_buffer_put ( ci -> i_xattrs .blob ) ;
862
+ old_blob = ci -> i_xattrs .blob ;
862
863
ci -> i_xattrs .blob = xattr_blob ;
863
864
if (xattr_blob )
864
865
memcpy (ci -> i_xattrs .blob -> vec .iov_base ,
@@ -1004,8 +1005,8 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
1004
1005
out :
1005
1006
if (new_cap )
1006
1007
ceph_put_cap (mdsc , new_cap );
1007
- if ( xattr_blob )
1008
- ceph_buffer_put (xattr_blob );
1008
+ ceph_buffer_put ( old_blob );
1009
+ ceph_buffer_put (xattr_blob );
1009
1010
ceph_put_string (pool_ns );
1010
1011
return err ;
1011
1012
}
0 commit comments