[PATCH] VFS: Ensure LOOKUP_CONTINUE flag is preserved by link_path_walk()
Trond Myklebust authored

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
Cc: Al Viro <viro@ftp.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
f55eab82
Name Last commit Last update
..
9p [PATCH] v9fs: fix corner cases when flushing request
adfs [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reason
affs [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
afs add loglevel to printk in fs/afs/cmservice.c
autofs [PATCH] capable/capability.h (fs/)
autofs4 [PATCH] autofs4 oops fix
befs remove unused fs/befs/attribute.c
bfs [PATCH] bfs iget() abuses
cifs [CIFS] Remove compiler warning
coda [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
configfs [PATCH] BUG_ON() Conversion in fs/configfs/
cramfs [PATCH] fs/cramfs/uncompress.c should #include <linux/cramfs_fs.h>
debugfs [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
devfs [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
devpts [PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
efs return statement cleanup - kill pointless parentheses
exportfs [PATCH] exportfs: add find_acceptable_alias helper
ext2 [PATCH] quota: fix error code for ext2_new_inode()
ext3 [PATCH] Fix two ext[23] uninitialized warnings
fat [PATCH] fat: Fix truncate() write ordering
freevxfs [PATCH] fix possible PAGE_CACHE_SHIFT overflows
fuse [PATCH] fuse: fix request_end() vs fuse_reset_request() race
hfs [PATCH] hfs: cleanup HFS prints
hfsplus [PATCH] hfs: set type/creator for symlinks
hostfs [PATCH] uml: hostfs - fix possible PAGE_CACHE_SHIFT overflows
hpfs
hppfs
hugetlbfs
isofs
jbd
jffs
jffs2
jfs
lockd
minix
msdos
ncpfs
nfs
nfs_common
nfsd
nls
ntfs
ocfs2
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
relayfs
romfs
smbfs
sysfs
sysv
udf
ufs
vfat
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
inode.c
inotify.c
ioctl.c
ioprio.c
libfs.c
locks.c
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c
readdir.c
select.c
seq_file.c
stat.c
super.c
xattr.c
xattr_acl.c