X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_lvb.c;h=22cc7cebbbcc495568f82951a89914f10e1bfc4e;hp=95ff6325db920ea8cfd3ee14192c5bc65893963f;hb=b046468f58a1f40e85cb59ed9abf75fd2fd5ea5a;hpb=fa63b09847e00234a4cf7d9f2ee3b13d05689010 diff --git a/lustre/mdt/mdt_lvb.c b/lustre/mdt/mdt_lvb.c index 95ff632..22cc7ce 100644 --- a/lustre/mdt/mdt_lvb.c +++ b/lustre/mdt/mdt_lvb.c @@ -21,7 +21,7 @@ * GPL HEADER END */ /* - * Copyright (c) 2012, 2013, Intel Corporation. + * Copyright (c) 2012, 2014, Intel Corporation. * Use is subject to license terms. * * lustre/mdt/mdt_lvb.c @@ -114,7 +114,8 @@ static int mdt_lvbo_fill(struct ldlm_lock *lock, void *lvb, int lvblen) RETURN(rc); } - if (!ldlm_has_layout(lock)) + /* Only fill layout if layout lock is granted */ + if (!ldlm_has_layout(lock) || lock->l_granted_mode != lock->l_req_mode) RETURN(0); /* layout lock will be granted to client, fill in lvb with layout */