ceph: initialize pathbase in the !dentry case in encode_caps_cb()
Ilya Dryomov
maintainerPATCH 1/1 ceph: initialize pathbase in the !dentry case in encode_caps_cb()
pathbase is the base inode; set it to 0 if we've got no path.
Coverity-id: 146348
Signed-off-by Ilya Dryomov <[email protected]>
--- fs/ceph/mds_client.c | 1 + 1 file changed, 1 insertion(+)
fs/ceph/mds_client.c +1 -0
@@ -2759,6 +2759,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, }else { path =NULL ; pathlen =0 ; + pathbase =0 ; }spin_lock (&ci->i_ceph_lock);
Signature · 1 line
2.4.3
Quoted 4 lines · Ilya Dryomov
pathbase is the base inode; set it to 0 if we've got no path.
Coverity-id: 146348
Signed-off-by Ilya Dryomov <[email protected]>
I'm surprised the compiler didn't complain about this.
Reviewed-by Alex Elder <[email protected]>
Quoted 17 lines
--- fs/ceph/mds_client.c | 1 + 1 file changed, 1 insertion(+)fs/ceph/mds_client.c +1
-0@@ -2759,6 +2759,7 @@ static int encode_caps_cb(struct inode *inode, struct ceph_cap *cap, }else { path =NULL ; pathlen =0 ; + pathbase =0 ; }spin_lock (&ci->i_ceph_lock);