From e00ea21cc99c35ac4ea1386f18964ee5c2b1808b Mon Sep 17 00:00:00 2001 From: Bruno Faccini Date: Wed, 26 Jun 2013 12:54:01 +0200 Subject: [PATCH 1/1] 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 --- lustre/mdt/mdt_handler.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 */ -- 1.8.3.1