aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 8d1f11c7a5a2..f091b1351786 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2324,7 +2324,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
2324 path = ceph_mdsc_build_path(dentry, &pathlen, &pathbase, 0); 2324 path = ceph_mdsc_build_path(dentry, &pathlen, &pathbase, 0);
2325 if (IS_ERR(path)) { 2325 if (IS_ERR(path)) {
2326 err = PTR_ERR(path); 2326 err = PTR_ERR(path);
2327 BUG_ON(err); 2327 goto out_dput;
2328 } 2328 }
2329 } else { 2329 } else {
2330 path = NULL; 2330 path = NULL;
@@ -2332,7 +2332,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
2332 } 2332 }
2333 err = ceph_pagelist_encode_string(pagelist, path, pathlen); 2333 err = ceph_pagelist_encode_string(pagelist, path, pathlen);
2334 if (err) 2334 if (err)
2335 goto out; 2335 goto out_free;
2336 2336
2337 spin_lock(&inode->i_lock); 2337 spin_lock(&inode->i_lock);
2338 cap->seq = 0; /* reset cap seq */ 2338 cap->seq = 0; /* reset cap seq */
@@ -2376,8 +2376,9 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap,
2376 unlock_kernel(); 2376 unlock_kernel();
2377 } 2377 }
2378 2378
2379out: 2379out_free:
2380 kfree(path); 2380 kfree(path);
2381out_dput:
2381 dput(dentry); 2382 dput(dentry);
2382 return err; 2383 return err;
2383} 2384}