From ff8198e01924600ae68b4a7f44378989b74c5882 Mon Sep 17 00:00:00 2001 From: "John L. Hammond" Date: Fri, 3 Jan 2014 17:42:08 -0600 Subject: [PATCH] LU-4430 mdt: check for MDS_FMODE_EXEC in mdt_mfd_open() In the error path of mdt_mfd_open() check for MDS_FMODE_EXEC rather than FMODE_EXEC in the open flags. Signed-off-by: John L. Hammond Change-Id: I04c53eb1af0fdeeb2c2b0c2f2ef1340b247921d8 Reviewed-on: http://review.whamcloud.com/8719 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Fan Yong Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_open.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 30c80e7..f5a244a 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -811,13 +811,14 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p, RETURN(rc); err_out: - if (flags & FMODE_WRITE) - /* XXX We also need to close io epoch here. - * See LU-1220 - green */ - mdt_write_put(o); - else if (flags & FMODE_EXEC) - mdt_write_allow(o); - return rc; + if (flags & FMODE_WRITE) + /* XXX We also need to close io epoch here. + * See LU-1220 - green */ + mdt_write_put(o); + else if (flags & MDS_FMODE_EXEC) + mdt_write_allow(o); + + return rc; } int mdt_finish_open(struct mdt_thread_info *info, -- 1.8.3.1