* [PATCH] ceph: initialize pathbase in the !dentry case in encode_caps_cb()
@ 2016-08-09 14:43 Ilya Dryomov
2016-08-09 14:48 ` Alex Elder
0 siblings, 1 reply; 2+ messages in thread
From: Ilya Dryomov @ 2016-08-09 14:43 UTC (permalink / raw)
To: ceph-devel; +Cc: Zheng Yan
pathbase is the base inode; set it to 0 if we've got no path.
Coverity-id: 146348
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
fs/ceph/mds_client.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index fa59a85226b2..f72d4ae303b2 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -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);
--
2.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ceph: initialize pathbase in the !dentry case in encode_caps_cb()
2016-08-09 14:43 [PATCH] ceph: initialize pathbase in the !dentry case in encode_caps_cb() Ilya Dryomov
@ 2016-08-09 14:48 ` Alex Elder
0 siblings, 0 replies; 2+ messages in thread
From: Alex Elder @ 2016-08-09 14:48 UTC (permalink / raw)
To: Ilya Dryomov, ceph-devel; +Cc: Zheng Yan
On 08/09/2016 09:43 AM, Ilya Dryomov wrote:
> pathbase is the base inode; set it to 0 if we've got no path.
>
> Coverity-id: 146348
> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
I'm surprised the compiler didn't complain about this.
Reviewed-by: Alex Elder <elder@linaro.org>
> ---
> fs/ceph/mds_client.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
> index fa59a85226b2..f72d4ae303b2 100644
> --- a/fs/ceph/mds_client.c
> +++ b/fs/ceph/mds_client.c
> @@ -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);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-09 14:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 14:43 [PATCH] ceph: initialize pathbase in the !dentry case in encode_caps_cb() Ilya Dryomov
2016-08-09 14:48 ` Alex Elder
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.