aha/fs
Miklos Szeredi d70b67c8bc [patch] vfs: fix lookup on deleted directory
Lookup can install a child dentry for a deleted directory.  This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.

This isn't a big problem normally, since memory pressure or umount
will clear out the directory dentry and its children, releasing the
inode.  But for UBIFS this causes problems because its orphan area can
overflow.

Fix this by returning ENOENT for all lookups on a S_DEAD directory
before creating a child dentry.

Thanks to Zoltan Sogor for noticing this while testing UBIFS, and
Artem for the excellent analysis of the problem and testing.

Reported-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tested-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2008-07-26 20:53:05 -04:00
..
9p 9p: fix O_APPEND in legacy mode 2008-07-03 09:59:03 -05:00
adfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
affs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
afs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
autofs
autofs4 autofs4: remove unused ioctls 2008-07-24 10:47:33 -07:00
befs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
bfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
cifs Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 2008-07-26 12:45:32 -07:00
coda SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
configfs configfs: Allow ->make_item() and ->make_group() to return detailed errors. 2008-07-17 15:21:29 -07:00
cramfs
debugfs debugfs: Implement debugfs_remove_recursive() 2008-07-21 21:54:59 -07:00
devpts
dlm locks: add special return value for asynchronous locks 2008-07-25 10:53:47 -07:00
ecryptfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
efs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
exportfs
ext2 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
ext3 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
ext4 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
fat SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
freevxfs
fuse SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
gfs2 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
hfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
hfsplus SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
hostfs
hpfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
hppfs
hugetlbfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
isofs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
jbd jbd: don't abort if flushing file data failed 2008-07-25 10:53:32 -07:00
jbd2 ext4: Add ordered mode support for delalloc 2008-07-11 19:27:31 -04:00
jffs2 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
jfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
lockd locks: add special return value for asynchronous locks 2008-07-25 10:53:47 -07:00
minix SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
msdos fatfs: add UTC timestamp option 2008-07-25 10:53:34 -07:00
ncpfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
nfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
nfs_common
nfsd lockd: dont return EAGAIN for a permanent error 2008-07-25 10:53:47 -07:00
nls
ntfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
ocfs2 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
omfs omfs: update kbuild to include OMFS 2008-07-26 12:00:05 -07:00
openpromfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
partitions fs/partitions/efi: convert to pr_debug 2008-07-25 10:53:44 -07:00
proc /proc/PID/syscall 2008-07-26 12:00:10 -07:00
qnx4 SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
ramfs ramfs: enable splice write 2008-07-04 09:52:14 +02:00
reiserfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
romfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
smbfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
sysfs Use WARN() in fs/sysfs 2008-07-26 12:00:07 -07:00
sysv SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
ubifs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
udf SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
ufs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
vfat fatfs: add UTC timestamp option 2008-07-25 10:53:34 -07:00
xfs SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
aio.c kill PF_BORROWED_MM in favour of PF_KTHREAD 2008-07-25 10:53:39 -07:00
anon_inodes.c flag parameters: NONBLOCK in anon_inode_getfd 2008-07-24 10:47:28 -07:00
attr.c
bad_inode.c
binfmt_aout.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_elf.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_elf_fdpic.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_em86.c
binfmt_flat.c tracehook: exec 2008-07-26 12:00:08 -07:00
binfmt_misc.c binfmt_misc: use simple_read_from_buffer() 2008-07-24 10:47:27 -07:00
binfmt_script.c
binfmt_som.c tracehook: exec 2008-07-26 12:00:08 -07:00
bio-integrity.c block: integrity checkpatch cleanups 2008-07-03 13:21:13 +02:00
bio.c dio: use get_user_pages_fast 2008-07-26 12:00:06 -07:00
block_dev.c SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
buffer.c Use WARN() in fs/ 2008-07-26 12:00:07 -07:00
char_dev.c Remove the lock_kernel() call from chrdev_open() 2008-06-20 14:05:53 -06:00
compat.c flag parameters: signalfd 2008-07-24 10:47:27 -07:00
compat_binfmt_elf.c
compat_ioctl.c remove unused #include <linux/dirent.h>'s 2008-07-25 10:53:34 -07:00
dcache.c vfs: add cond_resched_lock while scanning dentry LRU lists 2008-07-26 12:00:02 -07:00
dcookies.c
direct-io.c dio: use get_user_pages_fast 2008-07-26 12:00:06 -07:00
dnotify.c
dquot.c quota: implement sending information via netlink about user below quota 2008-07-25 10:53:35 -07:00
drop_caches.c
eventfd.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
eventpoll.c flag parameters add-on: remove epoll_create size param 2008-07-24 10:47:29 -07:00
exec.c tracehook: exec 2008-07-26 12:00:08 -07:00
fcntl.c flag parameters: dup2 2008-07-24 10:47:28 -07:00
fifo.c Detach sched.h from mm.h 2007-05-21 09:18:19 -07:00
file.c
file_table.c
filesystems.c
fs-writeback.c VFS: export sync_sb_inodes 2008-07-14 19:10:52 +03:00
generic_acl.c
inode.c SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
inotify.c
inotify_user.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
internal.h
ioctl.c
ioprio.c
Kconfig omfs: update kbuild to include OMFS 2008-07-26 12:00:05 -07:00
Kconfig.binfmt
libfs.c add kernel-doc for simple_read_from_buffer and memory_read_from_buffer 2008-07-04 10:40:07 -07:00
locks.c SL*B: drop kmem cache argument from constructor 2008-07-26 12:00:07 -07:00
Makefile omfs: update kbuild to include OMFS 2008-07-26 12:00:05 -07:00
mbcache.c
mpage.c vfs: add hooks for ext4's delayed allocation support 2008-07-11 19:27:31 -04:00
namei.c [patch] vfs: fix lookup on deleted directory 2008-07-26 20:53:05 -04:00
namespace.c Use WARN() in fs/ 2008-07-26 12:00:07 -07:00
nfsctl.c
no-block.c
open.c fs: check for statfs overflow 2008-07-24 10:47:19 -07:00
pipe.c flag parameters: NONBLOCK in pipe 2008-07-24 10:47:29 -07:00
pnode.c
pnode.h
posix_acl.c
quota.c quota: cleanup loop in sync_dquots() 2008-07-25 10:53:35 -07:00
quota_v1.c quota: move function-macros from quota.h to quotaops.h 2008-07-25 10:53:35 -07:00
quota_v2.c quota: move function-macros from quota.h to quotaops.h 2008-07-25 10:53:35 -07:00
read_write.c Remove BKL from remote_llseek v2 2008-07-02 15:06:27 -06:00
read_write.h
readdir.c
select.c Fix performance regression on lmbench select benchmark 2008-06-22 12:23:15 -07:00
seq_file.c
signalfd.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
splice.c splice: use get_user_pages_fast 2008-07-26 12:00:06 -07:00
stack.c
stat.c
super.c fix soft lock up at NFS mount via per-SB LRU-list of unused dentries 2008-07-24 10:47:15 -07:00
sync.c SYNC_FILE_RANGE_WRITE may and will block. Document that. 2008-07-24 10:47:17 -07:00
timerfd.c flag parameters: check magic constants 2008-07-24 10:47:29 -07:00
utimes.c [patch for 2.6.26 4/4] vfs: utimensat(): fix write access check for futimens() 2008-06-23 08:43:52 -04:00
xattr.c
xattr_acl.c