diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-21 16:53:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-21 16:53:34 -0400 |
commit | 7ce1e15d9a85a2b589a68a04afb2b2ded109b680 (patch) | |
tree | 0f21f4f97f7ac5efc0994656a57d6489a4f05b60 /fs/udf/balloc.c | |
parent | 70cb0d02b58128db07fc39b5e87a2873e2c16bde (diff) | |
parent | 6565c182094f69e4ffdece337d395eb7ec760efc (diff) |
Merge tag 'for_v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull ext2, quota, udf fixes and cleanups from Jan Kara:
- two small quota fixes (in grace time handling and possible missed
accounting of preallocated blocks beyond EOF).
- some ext2 cleanups
- udf fixes for better compatibility with Windows 10 generated media
(named streams, write-protection using domain-identifier, placement
of volume recognition sequence)
- some udf cleanups
* tag 'for_v5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
quota: fix wrong condition in is_quota_modification()
fs-udf: Delete an unnecessary check before brelse()
ext2: Delete an unnecessary check before brelse()
udf: Drop forward function declarations
udf: Verify domain identifier fields
udf: augment UDF permissions on new inodes
udf: Use dynamic debug infrastructure
udf: reduce leakage of blocks related to named streams
udf: prevent allocation beyond UDF partition
quota: fix condition for resetting time limit in do_set_dqblk()
ext2: code cleanup for ext2_free_blocks()
ext2: fix block range in ext2_data_block_valid()
udf: support 2048-byte spacing of VRS descriptors on 4K media
udf: refactor VRS descriptor identification
Diffstat (limited to 'fs/udf/balloc.c')
-rw-r--r-- | fs/udf/balloc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/udf/balloc.c b/fs/udf/balloc.c index ec85aeaed54a..02f03fadb75b 100644 --- a/fs/udf/balloc.c +++ b/fs/udf/balloc.c | |||
@@ -325,6 +325,17 @@ got_block: | |||
325 | newblock = bit + (block_group << (sb->s_blocksize_bits + 3)) - | 325 | newblock = bit + (block_group << (sb->s_blocksize_bits + 3)) - |
326 | (sizeof(struct spaceBitmapDesc) << 3); | 326 | (sizeof(struct spaceBitmapDesc) << 3); |
327 | 327 | ||
328 | if (newblock >= sbi->s_partmaps[partition].s_partition_len) { | ||
329 | /* | ||
330 | * Ran off the end of the bitmap, and bits following are | ||
331 | * non-compliant (not all zero) | ||
332 | */ | ||
333 | udf_err(sb, "bitmap for partition %d corrupted (block %u marked" | ||
334 | " as free, partition length is %u)\n", partition, | ||
335 | newblock, sbi->s_partmaps[partition].s_partition_len); | ||
336 | goto error_return; | ||
337 | } | ||
338 | |||
328 | if (!udf_clear_bit(bit, bh->b_data)) { | 339 | if (!udf_clear_bit(bit, bh->b_data)) { |
329 | udf_debug("bit already cleared for block %d\n", bit); | 340 | udf_debug("bit already cleared for block %d\n", bit); |
330 | goto repeat; | 341 | goto repeat; |