From: Linus Torvalds Date: Sat, 8 Feb 2020 21:04:49 +0000 (-0800) Subject: Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs X-Git-Tag: v5.15~4509 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=236f45329460f76d058111de1a1cea12f5a8b734;p=platform%2Fkernel%2Flinux-starfive.git Merge branch 'work.misc' of git://git./linux/kernel/git/viro/vfs Pull misc vfs updates from Al Viro: - bmap series from cmaiolino - getting rid of convolutions in copy_mount_options() (use a couple of copy_from_user() instead of the __get_user() crap) * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: saner copy_mount_options() fibmap: Reject negative block numbers fibmap: Use bmap instead of ->bmap method in ioctl_fibmap ecryptfs: drop direct calls to ->bmap cachefiles: drop direct usage of ->bmap method. fs: Enable bmap() function to properly return errors --- 236f45329460f76d058111de1a1cea12f5a8b734 diff --cc fs/f2fs/data.c index 8bd9afa81c54,e948902c4ec5..b27b72107911 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@@ -3662,10 -3167,11 +3662,12 @@@ static int check_swap_activate(struct s probe_block = 0; page_no = 0; last_block = i_size_read(inode) >> blkbits; - while ((probe_block + blocks_per_page) <= last_block && page_no < max) { + while ((probe_block + blocks_per_page) <= last_block && + page_no < sis->max) { unsigned block_in_page; sector_t first_block; + sector_t block = 0; + int err = 0; cond_resched(); diff --cc fs/jbd2/journal.c index eb8ca446d1ab,01fa5d247e39..a49d0e670ddf --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@@ -804,8 -806,12 +805,11 @@@ int jbd2_journal_bmap(journal_t *journa "at offset %lu on %s\n", __func__, blocknr, journal->j_devname); err = -EIO; - __journal_abort_soft(journal, err); - + jbd2_journal_abort(journal, err); + } else { + *retp = block; } + } else { *retp = blocknr; /* +journal->j_blk_offset */ }