vfs: only add " (deleted)" where necessary
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 10 Aug 2010 09:41:40 +0000 (11:41 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 11 Aug 2010 04:28:21 +0000 (00:28 -0400)
commitffd1f4ed5bddccf2277e3d8525bcedf1983319f8
tree2a1b08b204820ba0e9ecb7397ee7a08daff01594
parentf2eb6575d5beba1e98d400463007d77555d1fc35
vfs: only add " (deleted)" where necessary

__d_path() has 4 callers:

  d_path()
  sys_getcwd()
  seq_path_root()
  tomoyo_realpath_from_path2()

Of these the only one which needs the " (deleted)" ending is d_path().

sys_getcwd() checks for existence before calling __d_path().

seq_path_root() is used to show the mountpoint path in
/proc/PID/mountinfo, which is always a positive.

And tomoyo doesn't want the deleted ending.

Create a helper "path_with_deleted()" as subsequent patches will need
this in multiple places.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c