X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_open.c;h=97918c48240074a1bdeeabe77ec77ae0a2df3b8e;hp=c779056d75c5aab5eac5c1f13ff1bef07e185dc3;hb=2bc5bcb7efa247fcd8cc65d013ffc9f6c33dd788;hpb=527ffb003f20db73c463951416b408bff6e8e4cf diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index c779056..97918c4 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -755,8 +755,18 @@ static int mdt_mfd_open(struct mdt_thread_info *info, struct mdt_object *p, rc = mo_open(info->mti_env, mdt_object_child(o), created ? flags | MDS_OPEN_CREATED : flags); - if (rc) - GOTO(err_out, rc); + if (rc != 0) { + /* If we allow the client to chgrp (CFS_SETGRP_PERM), but the + * client does not know which suppgid should be sent to the MDS, + * or some other(s) changed the target file's GID after this RPC + * sent to the MDS with the suppgid as the original GID, then we + * give the client another chance to send the right suppgid. */ + if (rc == -EACCES && + allow_client_chgrp(info, lu_ucred(info->mti_env))) + mdt_set_disposition(info, rep, DISP_OPEN_DENY); + + GOTO(err_out, rc); + } mfd = mdt_mfd_new(med); if (mfd == NULL)