]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fail fileio write if we can't allocate a block
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Dec 2013 18:19:46 +0000 (13:19 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Dec 2013 18:19:48 +0000 (13:19 -0500)
commit8a86bbb19714c135aef07095d0b3c1d7e4f7a155
tree672d2d9c1a1d471136a29693f8c97a7586cdb23d
parent13b48a0ae1b4556fdddbc3742022137302498300
libext2fs: fail fileio write if we can't allocate a block

If we're using ext2fs_file_write() to write to a hole in a file,
ensure that we can actually allocate the block before updating i_size.
In other words, don't update i_size and don't return success if we hit
an error while allocating space.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/fileio.c