Comment 1 for bug 44783

Revision history for this message
Niklas Edmundsson (niklas-edmundsson) wrote : Fix recursive symlink handling

Cut&paste from the attachment:

-----------8<-----------
 When walking a path, the LOOKUP_CONTINUE flag is used by some filesystems
 (for instance NFS) in order to determine whether or not it is looking up
 the last component of the path. It this is the case, it may have to look
 at the intent information in order to perform various tasks such as atomic
 open.

 A problem currently occurs when link_path_walk() hits a symlink. In this
 case LOOKUP_CONTINUE may be cleared prematurely when we hit the end of the
 path passed by __vfs_follow_link() (i.e. the end of the symlink path)
 rather than when we hit the end of the path passed by the user.

 The solution is to have link_path_walk() clear LOOKUP_CONTINUE if and only
 if that flag was unset when we entered the function.

 Signed-off-by: Trond Myklebust <email address hidden>
-----------8<-----------