linux/fs/xfs/linux-2.6
Dave Chinner 07f1a4f5e8 xfs: Check new inode size is OK before preallocating
The new xfsqa test 228 tries to preallocate more space than the
filesystem contains. it should fail, but instead triggers an assert
about lock flags.  The failure is due to the size extension failing
in vmtruncate() due to rlimit being set. Check this before we start
the preallocation to avoid allocating space that will never be used.

Also the path through xfs_vn_allocate already holds the IO lock, so
it should not be present in the lock flags when the setattr fails.
Hence the assert needs to take this into account. This will prevent
other such callers from hitting this incorrect ASSERT.

(Fixed a reference to "newsize" to read "new_size". -Alex)

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
2010-05-28 15:19:12 -05:00
..
kmem.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
kmem.h xfs: replace KM_LARGE with explicit vmalloc use 2010-01-21 13:44:56 -06:00
mrlock.h
sv.h remove dead code from sv_t implementation 2008-12-04 15:39:21 +11:00
time.h
xfs_acl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
xfs_aops.c xfs: clean up end index calculation in xfs_page_state_convert 2010-05-19 09:58:20 -05:00
xfs_aops.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_buf.c xfs: Improve scalability of busy extent tracking 2010-05-24 10:34:00 -05:00
xfs_buf.h xfs: add blockdev name to kthreads 2010-05-19 09:58:07 -05:00
xfs_cred.h [XFS] Fix merge failures 2008-12-29 16:47:18 +11:00
xfs_dmapi_priv.h
xfs_export.c Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs into for-2.6.34-incoming 2010-03-04 12:04:51 -05:00
xfs_export.h
xfs_file.c xfs: wait for direct I/O to complete in fsync and write_inode 2010-05-19 09:58:14 -05:00
xfs_fs_subr.c xfs: remove duplicate buffer flags 2010-01-21 13:44:36 -06:00
xfs_fs_subr.h
xfs_globals.c [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_globals.h CRED: Separate task security context from task_struct 2008-11-14 10:39:16 +11:00
xfs_ioctl.c xfs: Fix integer overflow in fs/xfs/linux-2.6/xfs_ioctl*.c 2010-05-19 09:58:07 -05:00
xfs_ioctl.h xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00
xfs_ioctl32.c xfs: Fix integer overflow in fs/xfs/linux-2.6/xfs_ioctl*.c 2010-05-19 09:58:07 -05:00
xfs_ioctl32.h [XFS] fix compile on 32 bit systems 2008-12-04 13:07:29 +11:00
xfs_iops.c xfs: Check new inode size is OK before preallocating 2010-05-28 15:19:12 -05:00
xfs_iops.h [XFS] add a FMODE flag to make XFS invisible I/O less hacky 2008-12-11 13:14:41 +11:00
xfs_linux.h xfs: kill xfs_lrw.h 2010-03-01 16:35:44 -06:00
xfs_quotaops.c xfs: Improve scalability of busy extent tracking 2010-05-24 10:34:00 -05:00
xfs_stats.c xfs: switch to seq_file 2009-09-15 12:29:24 -05:00
xfs_stats.h [XFS] add new btree statistics 2008-10-30 16:55:03 +11:00
xfs_super.c xfs: Introduce delayed logging core code 2010-05-24 10:38:03 -05:00
xfs_super.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_sync.c xfs: enforce synchronous writes in xfs_bwrite 2010-05-19 09:58:13 -05:00
xfs_sync.h xfs: add a shrinker to background inode reclaim 2010-04-29 16:22:13 -05:00
xfs_sysctl.c sysctl: Drop & in front of every proc_handler. 2009-11-18 08:37:40 -08:00
xfs_sysctl.h [XFS] remove restricted chown parameter from xfs linux 2008-10-30 18:30:48 +11:00
xfs_trace.c xfs: xfs_trace.c: duplicated include 2010-05-19 09:58:14 -05:00
xfs_trace.h xfs: Improve scalability of busy extent tracking 2010-05-24 10:34:00 -05:00
xfs_version.h
xfs_vnode.h xfs: event tracing support 2009-12-14 23:08:16 -06:00
xfs_xattr.c xfs: convert attr to use unsigned names 2010-01-20 10:47:48 +11:00