Message ID | 20220412070745.22795-3-xiubli@redhat.com |
---|---|
State | New |
Headers | show |
Series | ceph: misc fix size truncate for fscrypt | expand |
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index a5145a2b7228..1c775a365b5e 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2300,7 +2300,6 @@ static int fill_fscrypt_truncate(struct inode *inode, pos = orig_pos; ret = __ceph_sync_read(inode, &pos, &iter, &retry_op, &objver); - ceph_put_cap_refs(ci, got); if (ret < 0) goto out; @@ -2364,6 +2363,7 @@ static int fill_fscrypt_truncate(struct inode *inode, out: dout("%s %p size dropping cap refs on %s\n", __func__, inode, ceph_cap_string(got)); + ceph_put_cap_refs(ci, got); kunmap_local(iov.iov_base); if (page) __free_pages(page, 0);
Signed-off-by: Xiubo Li <xiubli@redhat.com> --- fs/ceph/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)