Whamcloud - gitweb
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>