Whamcloud - gitweb
LU-4320 mdt: fixup MDS_SWAP_LAYOUTS ELC handling
[fs/lustre-release.git] / lustre / mdc / mdc_request.c
index 85fd541..4e540d6 100644 (file)
@@ -2416,9 +2416,11 @@ static int mdc_ioc_swap_layouts(struct obd_export *exp,
         * with the request RPC to avoid extra RPC round trips
         */
        count = mdc_resource_get_unused(exp, &op_data->op_fid1, &cancels,
-                                       LCK_CR, MDS_INODELOCK_LAYOUT);
+                                       LCK_EX, MDS_INODELOCK_LAYOUT |
+                                       MDS_INODELOCK_XATTR);
        count += mdc_resource_get_unused(exp, &op_data->op_fid2, &cancels,
-                                        LCK_CR, MDS_INODELOCK_LAYOUT);
+                                        LCK_EX, MDS_INODELOCK_LAYOUT |
+                                        MDS_INODELOCK_XATTR);
 
        req = ptlrpc_request_alloc(class_exp2cliimp(exp),
                                   &RQF_MDS_SWAP_LAYOUTS);