lustre/llite: Do not send parent dir fid in getattr by fid
authorOleg Drokin <green@linuxhacker.ru>
Sat, 1 Mar 2014 02:16:32 +0000 (21:16 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Mar 2014 03:04:50 +0000 (19:04 -0800)
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 <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/7910
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3240
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/llite/file.c

index fd0dd20e11704aad77f8ef5b0ec497a9a8e3d60d..7fbc18e3e654a19484b8f7c028f9964256eea72c 100644 (file)
@@ -362,7 +362,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;
index c9ee57473416548d7c20152d553ee8d449ea9e05..36c54aa48a6aa3dc3a54ebd33695b6eb3bb37301 100644 (file)
@@ -2891,7 +2891,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))