kernel-ark/fs
Christoph Hellwig 2c27c65ed0 check ATTR_SIZE contraints in inode_change_ok
Make sure we check the truncate constraints early on in ->setattr by adding
those checks to inode_change_ok.  Also clean up and document inode_change_ok
to make this obvious.

As a fallout we don't have to call inode_newsize_ok from simple_setsize and
simplify it down to a truncate_setsize which doesn't return an error.  This
simplifies a lot of setattr implementations and means we use truncate_setsize
almost everywhere.  Get rid of fat_setsize now that it's trivial and mark
ext2_setsize static to make the calling convention obvious.

Keep the inode_newsize_ok in vmtruncate for now as all callers need an
audit for its removal anyway.

Note: setattr code in ecryptfs doesn't call inode_change_ok at all and
needs a deeper audit, but that is left for later.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2010-08-09 16:47:39 -04:00
..
9p remove inode_setattr 2010-08-09 16:47:37 -04:00
adfs check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
affs remove inode_setattr 2010-08-09 16:47:37 -04:00
afs writeback: remove writeback_inodes_wbc 2010-07-06 08:54:03 +02:00
autofs fs/: do not fallback to default_llseek() when readdir() uses BKL 2010-05-27 09:12:56 -07:00
autofs4 fs/autofs4: use memdup_user 2010-05-27 09:12:41 -07:00
befs
bfs get rid of block_write_begin_newtrunc 2010-08-09 16:47:33 -04:00
btrfs remove inode_setattr 2010-08-09 16:47:37 -04:00
cachefiles CacheFiles: Fix error handling in cachefiles_determine_cache_security() 2010-05-12 18:23:58 -07:00
ceph ceph: use complete_all and wake_up_all 2010-07-27 13:11:17 -07:00
cifs always call inode_change_ok early in ->setattr 2010-08-09 16:47:38 -04:00
coda drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
configfs fix setattr error handling in sysfs, configfs 2010-06-04 17:16:29 -04:00
cramfs
debugfs Add x64 support to debugfs 2010-05-19 22:41:57 -04:00
devpts Simplify devpts_get_sb() failure exits 2010-05-21 18:31:12 -04:00
dlm
ecryptfs check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
efs
exofs remove inode_setattr 2010-08-09 16:47:37 -04:00
exportfs
ext2 check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
ext3 remove inode_setattr 2010-08-09 16:47:37 -04:00
ext4 remove inode_setattr 2010-08-09 16:47:37 -04:00
fat check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
freevxfs fs/: do not fallback to default_llseek() when readdir() uses BKL 2010-05-27 09:12:56 -07:00
fscache FS-Cache: Remove unneeded null checks 2010-06-01 13:32:11 -07:00
fuse check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
gfs2 check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
hfs remove inode_setattr 2010-08-09 16:47:37 -04:00
hfsplus remove inode_setattr 2010-08-09 16:47:37 -04:00
hostfs remove inode_setattr 2010-08-09 16:47:37 -04:00
hpfs remove inode_setattr 2010-08-09 16:47:37 -04:00
hppfs missing include in hppfs 2010-08-09 16:47:26 -04:00
hugetlbfs remove inode_setattr 2010-08-09 16:47:37 -04:00
isofs fs/: do not fallback to default_llseek() when readdir() uses BKL 2010-05-27 09:12:56 -07:00
jbd ext3: Fix waiting on transaction during fsync 2010-05-21 19:30:41 +02:00
jbd2 jbd2/ocfs2: Fix block checksumming when a buffer is used in several transactions 2010-07-15 15:17:47 -07:00
jffs2 check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
jfs remove inode_setattr 2010-08-09 16:47:37 -04:00
lockd
logfs always call inode_change_ok early in ->setattr 2010-08-09 16:47:38 -04:00
minix remove inode_setattr 2010-08-09 16:47:37 -04:00
ncpfs remove inode_setattr 2010-08-09 16:47:37 -04:00
nfs NFS: Fix a typo in include/linux/nfs_fs.h 2010-08-01 15:10:01 -07:00
nfs_common
nfsd Merge branch 'for-2.6.35' of git://linux-nfs.org/~bfields/linux 2010-06-09 12:43:04 -07:00
nilfs2 remove inode_setattr 2010-08-09 16:47:37 -04:00
nls
notify Saner locking around deactivate_super() 2010-05-21 18:31:14 -04:00
ntfs remove inode_setattr 2010-08-09 16:47:37 -04:00
ocfs2 check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
omfs remove inode_setattr 2010-08-09 16:47:37 -04:00
openpromfs
partitions [S390] dasd: use correct label location for diag fba disks 2010-07-19 09:22:50 +02:00
proc remove inode_setattr 2010-08-09 16:47:37 -04:00
qnx4 get rid of cont_write_begin_newtrunc 2010-08-09 16:47:31 -04:00
quota mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
ramfs check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
reiserfs always call inode_change_ok early in ->setattr 2010-08-09 16:47:38 -04:00
romfs
smbfs check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
squashfs squashfs: fix name reading in squashfs_xattr_get 2010-05-23 08:27:42 +01:00
sysfs rename generic_setattr 2010-08-09 16:47:35 -04:00
sysv remove inode_setattr 2010-08-09 16:47:37 -04:00
ubifs check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
udf remove inode_setattr 2010-08-09 16:47:37 -04:00
ufs check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
xfs get rid of block_write_begin_newtrunc 2010-08-09 16:47:33 -04:00
aio.c get rid of the magic around f_count in aio 2010-05-27 22:03:07 -04:00
anon_inodes.c Revert "anon_inode: set S_IFREG on the anon_inode" 2010-05-27 22:03:05 -04:00
attr.c check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
bad_inode.c drop unused dentry argument to ->fsync 2010-05-27 22:05:02 -04:00
binfmt_aout.c
binfmt_elf_fdpic.c binfmt_elf_fdpic: Fix clear_user() error handling 2010-06-01 08:11:06 -07:00
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c flat: tweak default stack alignment 2010-06-29 15:29:31 -07:00
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c
bio.c
block_dev.c get rid of block_write_begin_newtrunc 2010-08-09 16:47:33 -04:00
buffer.c get rid of block_write_begin_newtrunc 2010-08-09 16:47:33 -04:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c fs/compat_rw_copy_check_uvector: add missing compat_ptr call 2010-06-04 15:21:44 -07:00
dcache.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
dcookies.c
direct-io.c sort out blockdev_direct_IO variants 2010-08-09 16:47:29 -04:00
drop_caches.c new helper: iterate_supers() 2010-05-21 18:31:16 -04:00
eventfd.c
eventpoll.c sched, wait: Use wrapper functions 2010-05-11 17:43:58 +02:00
exec.c exit: avoid sig->count in de_thread/__exit_signal synchronization 2010-05-27 09:12:46 -07:00
fcntl.c fs/fcntl.c:kill_fasync_rcu() fa_lock must be IRQ-safe 2010-06-29 15:29:32 -07:00
fifo.c
file_table.c get rid of the magic around f_count in aio 2010-05-27 22:03:07 -04:00
file.c
filesystems.c
fs_struct.c
fs-writeback.c writeback: simplify the write back thread queue 2010-07-06 08:59:53 +02:00
generic_acl.c fs: xattr_handler table should be const 2010-05-21 18:31:18 -04:00
inode.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
internal.h Bury __put_super_and_need_restart() 2010-05-21 18:31:16 -04:00
ioctl.c Introduce freeze_super and thaw_super for the fsfreeze ioctl 2010-05-21 18:31:18 -04:00
ioprio.c
Kconfig
Kconfig.binfmt
libfs.c check ATTR_SIZE contraints in inode_change_ok 2010-08-09 16:47:39 -04:00
locks.c
Makefile Take statfs variants to fs/statfs.c 2010-05-21 18:31:17 -04:00
mbcache.c mm: add context argument to shrinker callback 2010-07-19 14:56:17 +10:00
mpage.c
namei.c VFS: fix recent breakage of FS_REVAL_DOT 2010-05-27 22:03:06 -04:00
namespace.c Merge branch 'next' into for-linus 2010-05-18 08:57:00 +10:00
nfsctl.c
no-block.c
open.c Take statfs variants to fs/statfs.c 2010-05-21 18:31:17 -04:00
pipe.c pipe: fix check in "set size" fcntl 2010-06-10 19:08:34 +02:00
pnode.c
pnode.h
posix_acl.c
read_write.c vfs: introduce noop_llseek() 2010-05-27 09:12:56 -07:00
read_write.h
readdir.c
select.c
seq_file.c
signalfd.c
splice.c splice: check f_mode for seekable file 2010-06-30 08:12:37 +02:00
stack.c
stat.c
statfs.c Take statfs variants to fs/statfs.c 2010-05-21 18:31:17 -04:00
super.c fs: fix superblock iteration race 2010-06-29 10:38:22 -07:00
sync.c Merge branch 'master' into for-linus 2010-06-01 12:42:12 +02:00
timerfd.c fs/timerfd.c: make use of wait_event_interruptible_locked_irq() 2010-05-20 13:21:42 -07:00
utimes.c
xattr_acl.c
xattr.c fs: xattr_handler table should be const 2010-05-21 18:31:18 -04:00