Linus Torvalds writes: (Summary) Why are you using a bind mount in the first place? Right now path_pts() just does
ret = path_parent_directory(path);
ret = path_parent_directory(path);
and that simply doesn't work for a bind mount file. The other user is follow_dotdot(), but that always takes a directory, so it wouldn't be affected.
takes a directory, so it wouldn't be affected.
But it's probably safer to just teach path_pts to just walk up the bind mount first, and then do the existing path_parent_directory.
ret = path_parent_directory(path);
and that simply doesn't work for a bind mount file. The other user is follow_dotdot(), but that always takes a directory, so it wouldn't be affected.
takes a directory, so it wouldn't be affected.
But it's probably safer to just teach path_pts to just walk up the bind mount first, and then do the existing path_parent_directory.