From: fanyong Date: Tue, 19 Feb 2008 09:48:05 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_7_0_51~231 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=b4a38ae741c6b3d17d78e34b5ad972bff1e619a4;p=fs%2Flustre-release.git Branch HEAD b=14906 i=eric.mei i=h.huang Fix swab issues for remote_perm introduced when land "mixed_layout_req". --- diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index 70aca4a..c546ef8 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -644,11 +644,10 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, struct mdt_remote_perm *perm; LASSERT(client_is_remote(exp)); - perm = req_capsule_server_get(pill, &RMF_ACL); + perm = req_capsule_server_swab_get(pill, &RMF_ACL, + lustre_swab_mdt_remote_perm); if (perm == NULL) RETURN(-EPROTO); - - lustre_swab_mdt_remote_perm(perm); } if (body->valid & OBD_MD_FLMDSCAPA) { struct lustre_capa *capa, *p; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index 953e148..ee3481b 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -182,7 +182,10 @@ static int mdc_getattr_common(struct obd_export *exp, if (body->valid & OBD_MD_FLRMTPERM) { struct mdt_remote_perm *perm; - perm = req_capsule_server_get(pill, &RMF_ACL); + + LASSERT(client_is_remote(exp)); + perm = req_capsule_server_swab_get(pill, &RMF_ACL, + lustre_swab_mdt_remote_perm); if (perm == NULL) RETURN(-EPROTO); } diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c index d43a7a2..47d46e5 100644 --- a/lustre/utils/liblustreapi.c +++ b/lustre/utils/liblustreapi.c @@ -1896,7 +1896,7 @@ static int do_rmtacl(int argc, char *argv[], int ops, int (output_func)(char *)) } if ((pid = fork()) < 0) { - perror("pipe"); + perror("fork"); close(fd[0]); close(fd[1]); return -1;