From 762f2114d282a98ebfa4dbbeea9298a8088ad24e Mon Sep 17 00:00:00 2001 From: Oleg Drokin Date: Wed, 9 Oct 2013 20:44:10 -0400 Subject: [PATCH] LU-3240 llite: Do not send parent dir fid in getattr by fid Sending getattr by fid in this case is pointless, as the parent might havelong changed and we have no control over it, but it's irrelevant anyway, since we already have the child fid. Signed-off-by: Oleg Drokin Change-Id: I8ea05e931cd85c126274b024a440137c309e5eb7 Reviewed-on: http://review.whamcloud.com/7910 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: wangdi Reviewed-by: Andreas Dilger --- lustre/llite/dir.c | 2 +- lustre/llite/file.c | 2 +- lustre/mdt/mdt_handler.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 04cf9d2..9a4c11c 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -360,7 +360,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, struct ptlrpc_request *request; struct md_op_data *op_data; - op_data = ll_prep_md_op_data(NULL, dir, NULL, NULL, 0, 0, + op_data = ll_prep_md_op_data(NULL, dir, dir, NULL, 0, 0, LUSTRE_OPC_ANY, NULL); if (IS_ERR(op_data)) return (void *)op_data; diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 7fb9a5e..ce5fb5a 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -3099,7 +3099,7 @@ int __ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it, oit.it_op = IT_LOOKUP; /* Call getattr by fid, so do not provide name at all. */ - op_data = ll_prep_md_op_data(NULL, dentry->d_parent->d_inode, + op_data = ll_prep_md_op_data(NULL, dentry->d_inode, dentry->d_inode, NULL, 0, 0, LUSTRE_OPC_ANY, NULL); if (IS_ERR(op_data)) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 5de7d78..757bae3 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1255,7 +1255,7 @@ static int mdt_getattr_name_lock(struct mdt_thread_info *info, } mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_EXECD); - if (unlikely(!mdt_object_exists(parent))) { + if (unlikely(!mdt_object_exists(parent)) && lname) { LU_OBJECT_DEBUG(D_INODE, info->mti_env, &parent->mot_obj, "Parent doesn't exist!\n"); -- 1.8.3.1