Whamcloud - gitweb
LU-3486 llite: remove ll_d_root_ops 97/6797/7
authorLai Siyao <laisiyao@whamcloud.com>
Thu, 27 Jun 2013 10:22:59 +0000 (18:22 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 1 Aug 2013 01:35:35 +0000 (01:35 +0000)
commit6784a15c6ee32019237151a63755103c68ff51dd
tree113b97dc37f3cce93e789d49ec4a82375cbbe219
parent04831bba6e2ee8d3c61c3dbc30d7eba043a453b1
LU-3486 llite: remove ll_d_root_ops

Mnt root dentry will never be revalidated, but its d_op->d_compare
will be called for its children, to simplify code, we use the same
ll_d_ops as normal dentries.
But its attribute may be invalid before access, this won't cause
any issue because it always exists, and the only operation depends
on its attribute is .permission, which has revalidated it in lustre
code.

So it's okay to remove ll_d_root_ops, and remove unnecessary checks
in lookup/revalidate/statahead.

This patch also includes several small fixes:
* don't d_add() for create only files, because the dentry is fake,
  and will be released right after use.
* alloc ll_dentry_data may fail, add check for this.

Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I97b71a9540146809171d80aa5d1a9d4f308faf7f
Reviewed-on: http://review.whamcloud.com/6797
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/dcache.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/llite_nfs.c
lustre/llite/namei.c
lustre/llite/statahead.c