kernel-ark/fs
Tejun Heo dd14cbc994 sysfs: fix race condition around sd->s_dentry, take#2
Allowing attribute and symlink dentries to be reclaimed means
sd->s_dentry can change dynamically.  However, updates to the field
are unsynchronized leading to race conditions.  This patch adds
sysfs_lock and use it to synchronize updates to sd->s_dentry.

Due to the locking around ->d_iput, the check in sysfs_drop_dentry()
is complex.  sysfs_lock only protect sd->s_dentry pointer itself.  The
validity of the dentry is protected by dcache_lock, so whether dentry
is alive or not can only be tested while holding both locks.

This is minimal backport of sysfs_drop_dentry() rewrite in devel
branch.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-12 16:08:47 -07:00
..
9p
adfs
affs
afs afs: needs sched.h 2007-05-31 07:58:14 -07:00
autofs
autofs4
befs
bfs
cifs [CIFS] CIFS should honour umask 2007-06-08 14:55:14 +00:00
coda
configfs
cramfs
debugfs
devpts
dlm
ecryptfs eCryptfs: delay writing 0's after llseek until write 2007-05-23 20:14:15 -07:00
efs
exportfs
ext2
ext3
ext4 When ext4_ext_insert_extent() fails to insert new blocks 2007-05-31 16:20:15 -04:00
fat
freevxfs
fuse fuse: delete inode on drop 2007-05-23 20:14:13 -07:00
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd
jbd2
jffs2 Merge git://git.infradead.org/mtd-2.6 2007-06-04 17:54:09 -07:00
jfs
lockd
minix
msdos
ncpfs
nfs NFS: Fix a refcount leakage in O_DIRECT 2007-05-30 16:26:01 -04:00
nfs_common
nfsd
nls
ntfs ntfs_init_locked_inode(): fix array indexing 2007-05-31 07:58:13 -07:00
ocfs2 ocfs2: Fix invalid assertion during write on 64k pages 2007-06-06 16:42:03 -07:00
openpromfs
partitions
proc
qnx4
ramfs RAMFS NOMMU: missed POSIX UID/GID inode attribute checking 2007-06-07 17:11:13 -07:00
reiserfs Missing 'const' from reiserfs MIN_KEY declaration. 2007-05-23 20:14:13 -07:00
romfs
smbfs
sysfs sysfs: fix race condition around sd->s_dentry, take#2 2007-06-12 16:08:47 -07:00
sysv
udf parse errors in ifdefs 2007-06-01 08:18:28 -07:00
ufs
vfat
xfs [XFS] Write at EOF may not update filesize correctly. 2007-05-29 18:15:17 +10:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c nommu: report correct errno in message 2007-06-08 17:23:32 -07:00
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat_ioctl.c fix compat console unimap regression 2007-05-25 17:37:46 -07:00
compat.c optimize compat_core_sys_select() by a using stack space for small fd sets 2007-05-23 20:14:12 -07:00
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c uselib: add missing MNT_NOEXEC check 2007-05-23 20:14:13 -07:00
fcntl.c
fifo.c
file_table.c
file.c
filesystems.c
fs-writeback.c
generic_acl.c
inode.c
inotify_user.c
inotify.c
internal.h
ioctl.c vanishing ioctl handler debugging 2007-06-04 13:25:10 -07:00
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
no-block.c
open.c
pipe.c
pnode.c
pnode.h
posix_acl.c
quota_v1.c
quota_v2.c
quota.c
read_write.c
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c signalfd: retrieve multiple signals with one read() call 2007-05-23 20:14:14 -07:00
splice.c splice: __generic_file_splice_read: fix read/truncate race 2007-06-08 08:34:11 +02:00
stack.c
stat.c
super.c
sync.c
timerfd.c
utimes.c
xattr_acl.c
xattr.c