* 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
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 */