fs: drop path_check_prereq()
path_check_prereq() has some bugs:

- It's called with S_IFLNK, but this is effectively a no-op because this
  case is not implemented in the function
- It uses lstat, but if stat or lstat should be used depends on the
  usecase: For opendir() stat() must be used, since we are not
  interested in the link, but in the target. For readlink() lstat() must
  be used since we are indeed interested in the link, not the target.

It's easier and better understandable to open code the functionality
where it's needed, so drop path_check_prereq() and do the right thing
where called.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 38197b8 commit 7f01c05e1e7e2cc1d9c389bd664b1b6eeaaa8ba6
@Sascha Hauer Sascha Hauer authored on 10 May 2017
Showing 1 changed file
View
fs/fs.c