From: Bruno Faccini Date: Wed, 26 Jun 2013 10:54:01 +0000 (+0200) Subject: LU-3474 mdt: mdt_links_read() to return linkea_init() errors X-Git-Tag: 2.4.52~57 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F72%2F6772%2F3;p=fs%2Flustre-release.git LU-3474 mdt: mdt_links_read() to return linkea_init() errors Handle linkea_init() errors. Signed-off-by: Bruno Faccini Change-Id: I2095084d6fb1ba71d15c0b63c183a642ebcf4200 Reviewed-on: http://review.whamcloud.com/6772 Tested-by: Hudson Tested-by: Maloo Reviewed-by: wangdi Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index d6c94f8..c4ce385 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -5590,9 +5590,7 @@ static int mdt_links_read(struct mdt_thread_info *info, if (rc < 0) return rc; - linkea_init(ldata); - - return 0; + return linkea_init(ldata); } static int mdt_path_current(struct mdt_thread_info *info, @@ -5644,7 +5642,7 @@ static int mdt_path_current(struct mdt_thread_info *info, rc = mdt_links_read(info, mdt_obj, &ldata); mdt_object_put(info->mti_env, mdt_obj); if (rc != 0) - GOTO(out, rc = PTR_ERR(buf)); + GOTO(out, rc); leh = buf->lb_buf; lee = (struct link_ea_entry *)(leh + 1); /* link #0 */