@@ -743,6 +743,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
743
743
int issued , new_issued , info_caps ;
744
744
struct timespec64 mtime , atime , ctime ;
745
745
struct ceph_buffer * xattr_blob = NULL ;
746
+ struct ceph_buffer * old_blob = NULL ;
746
747
struct ceph_string * pool_ns = NULL ;
747
748
struct ceph_cap * new_cap = NULL ;
748
749
int err = 0 ;
@@ -883,7 +884,7 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
883
884
if ((ci -> i_xattrs .version == 0 || !(issued & CEPH_CAP_XATTR_EXCL )) &&
884
885
le64_to_cpu (info -> xattr_version ) > ci -> i_xattrs .version ) {
885
886
if (ci -> i_xattrs .blob )
886
- ceph_buffer_put ( ci -> i_xattrs .blob ) ;
887
+ old_blob = ci -> i_xattrs .blob ;
887
888
ci -> i_xattrs .blob = xattr_blob ;
888
889
if (xattr_blob )
889
890
memcpy (ci -> i_xattrs .blob -> vec .iov_base ,
@@ -1023,8 +1024,8 @@ static int fill_inode(struct inode *inode, struct page *locked_page,
1023
1024
out :
1024
1025
if (new_cap )
1025
1026
ceph_put_cap (mdsc , new_cap );
1026
- if ( xattr_blob )
1027
- ceph_buffer_put (xattr_blob );
1027
+ ceph_buffer_put ( old_blob );
1028
+ ceph_buffer_put (xattr_blob );
1028
1029
ceph_put_string (pool_ns );
1029
1030
return err ;
1030
1031
}
0 commit comments