From e712d8bcb91cb29db0831dd9b9cfb17347c6e481 Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 29 Sep 2006 12:51:30 +0000 Subject: [PATCH] - added comment about access capa fields in mdt_body_unpack(). --- lustre/mdd/mdd_handler.c | 5 +++-- lustre/mdt/mdt_handler.c | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 7e21847..5e3a82b 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -604,10 +604,11 @@ static inline int mdd_is_sticky(const struct lu_env *env, /* Check whether it may delete the cobj under the pobj. */ static int mdd_may_delete(const struct lu_env *env, - struct mdd_object *pobj, struct mdd_object *cobj, + struct mdd_object *pobj, + struct mdd_object *cobj, int is_dir, int need_check) { - struct mdd_device *mdd = mdo2mdd(&cobj->mod_obj); + struct mdd_device *mdd = mdo2mdd(&pobj->mod_obj); int rc = 0; ENTRY; diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 628f6a2..6a4d131 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1451,6 +1451,11 @@ static int mdt_body_unpack(struct mdt_thread_info *info, __u32 flags) return -EINVAL; } + /* + * Dot not get size or any capa fields before we check that request + * contains capa actually. There are some requests which do not, for + * instance MDS_IS_SUBDIR. + */ if (req_capsule_has_field(pill, &RMF_CAPA1, RCL_CLIENT)) capa = req_capsule_client_get(pill, &RMF_CAPA1); -- 1.8.3.1