linux-IllusionX/fs
J. Bruce Fields 129a84de23 locks: fix F_GETLK regression (failure to find conflicts)
In 9d6a8c5c21 we changed posix_test_lock
to modify its single file_lock argument instead of taking separate input
and output arguments.  This makes it no longer safe to set the output
lock's fl_type to F_UNLCK before looking for a conflict, since that
means searching for a conflict against a lock with type F_UNLCK.

This fixes a regression which causes F_GETLK to incorrectly report no
conflict on most filesystems (including any filesystem that doesn't do
its own locking).

Also fix posix_lock_to_flock() to copy the lock type.  This isn't
strictly necessary, since the caller already does this; but it seems
less likely to cause confusion in the future.

Thanks to Doug Chapman for the bug report.

Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Acked-by: Doug Chapman <doug.chapman@hp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-10 20:25:59 -07:00
..
9p
adfs
affs affs: use zero_user_page 2007-05-09 12:30:55 -07:00
afs AFS: further write support fixes 2007-05-10 09:26:52 -07:00
autofs
autofs4
befs
bfs
cifs
coda
configfs use simple_read_from_buffer() in fs/ 2007-05-09 12:30:49 -07:00
cramfs
debugfs
devpts
dlm
ecryptfs
efs
exportfs
ext2
ext3 ext3: use zero_user_page 2007-05-09 12:30:55 -07:00
ext4
fat
freevxfs
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs
isofs
jbd fix file specification in comments 2007-05-09 08:58:16 +02:00
jbd2 fix file specification in comments 2007-05-09 08:58:16 +02:00
jffs2 Merge git://git.infradead.org/mtd-2.6 2007-05-09 13:10:11 -07:00
jfs Fix occurrences of "the the " 2007-05-09 08:57:56 +02:00
lockd
minix
msdos
ncpfs
nfs NFS: Kill the obsolete NFS_PARANOIA 2007-05-09 17:58:01 -04:00
nfs_common
nfsd knfsd: avoid Oops if buggy userspace performs confusing filehandle->dentry mapping 2007-05-09 12:30:54 -07:00
nls
ntfs
ocfs2 ocfs2: kobject/kset foobar 2007-05-10 09:26:52 -07:00
openpromfs
partitions
proc smaps: only define clear_refs for CONFIG_MMU 2007-05-08 20:41:14 -07:00
qnx4
ramfs
reiserfs Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
romfs
smbfs
sysfs use simple_read_from_buffer() in fs/ 2007-05-09 12:30:49 -07:00
sysv
udf
ufs
vfat
xfs Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
aio.c unify flush_work/flush_work_keventd and rename it to cancel_work_sync 2007-05-09 12:30:53 -07:00
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c use simple_read_from_buffer() in fs/ 2007-05-09 12:30:49 -07:00
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c Add suspend-related notifications for CPU hotplug 2007-05-09 12:30:56 -07:00
char_dev.c
compat.c
compat_ioctl.c Allow compat_ioctl.c to compile without CONFIG_NET 2007-05-10 13:34:05 -07:00
dcache.c
dcookies.c
direct-io.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial 2007-05-09 12:54:17 -07:00
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
generic_acl.c
inode.c
inotify.c
inotify_user.c
internal.h
ioctl.c
ioprio.c
Kconfig Remove obsolete fat_cvf help text 2007-05-09 08:58:15 +02:00
Kconfig.binfmt
libfs.c fs/libfs.c: >80 columns line break fix 2007-05-09 06:44:57 +02:00
locks.c locks: fix F_GETLK regression (failure to find conflicts) 2007-05-10 20:25:59 -07:00
Makefile
mbcache.c
mpage.c fs: convert core functions to zero_user_page 2007-05-09 12:30:55 -07:00
namei.c fs: use path_walk in do_path_lookup 2007-05-09 12:30:50 -07:00
namespace.c
nfsctl.c
no-block.c
open.c Remove suid/sgid bits on [f]truncate() 2007-05-08 20:10:00 -07:00
pipe.c
pnode.c
pnode.h
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c
read_write.h
readdir.c
select.c Style fix in fs/select.c 2007-05-09 07:10:02 +02:00
seq_file.c
splice.c
stack.c
stat.c
super.c
sync.c
utimes.c
xattr.c
xattr_acl.c