Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 bug fixes from Ted Ts'o:
"Fix a number of ext4 bugs"

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix special inode number checks in __ext4_iget()
ext4: track writeback errors using the generic tracking infrastructure
ext4: use ext4_write_inode() when fsyncing w/o a journal
ext4: avoid kernel warning when writing the superblock to a dead device
ext4: fix a potential fiemap/page fault deadlock w/ inline_data
ext4: make sure enough credits are reserved for dioread_nolock writes

+19 -10
+12 -4
fs/ext4/fsync.c
··· 116 116 goto out; 117 117 } 118 118 119 + ret = file_write_and_wait_range(file, start, end); 120 + if (ret) 121 + return ret; 122 + 119 123 if (!journal) { 120 - ret = __generic_file_fsync(file, start, end, datasync); 124 + struct writeback_control wbc = { 125 + .sync_mode = WB_SYNC_ALL 126 + }; 127 + 128 + ret = ext4_write_inode(inode, &wbc); 121 129 if (!ret) 122 130 ret = ext4_sync_parent(inode); 123 131 if (test_opt(inode->i_sb, BARRIER)) ··· 133 125 goto out; 134 126 } 135 127 136 - ret = file_write_and_wait_range(file, start, end); 137 - if (ret) 138 - return ret; 139 128 /* 140 129 * data=writeback,ordered: 141 130 * The caller's filemap_fdatawrite()/wait will sync the data. ··· 164 159 ret = err; 165 160 } 166 161 out: 162 + err = file_check_and_advance_wb_err(file); 163 + if (ret == 0) 164 + ret = err; 167 165 trace_ext4_sync_file_exit(inode, ret); 168 166 return ret; 169 167 }
+3 -3
fs/ext4/inline.c
··· 1890 1890 physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data; 1891 1891 physical += offsetof(struct ext4_inode, i_block); 1892 1892 1893 - if (physical) 1894 - error = fiemap_fill_next_extent(fieinfo, start, physical, 1895 - inline_len, flags); 1896 1893 brelse(iloc.bh); 1897 1894 out: 1898 1895 up_read(&EXT4_I(inode)->xattr_sem); 1896 + if (physical) 1897 + error = fiemap_fill_next_extent(fieinfo, start, physical, 1898 + inline_len, flags); 1899 1899 return (error < 0 ? error : 0); 1900 1900 } 1901 1901
+3 -2
fs/ext4/inode.c
··· 2778 2778 * We may need to convert up to one extent per block in 2779 2779 * the page and we may dirty the inode. 2780 2780 */ 2781 - rsv_blocks = 1 + (PAGE_SIZE >> inode->i_blkbits); 2781 + rsv_blocks = 1 + ext4_chunk_trans_blocks(inode, 2782 + PAGE_SIZE >> inode->i_blkbits); 2782 2783 } 2783 2784 2784 2785 /* ··· 4834 4833 gid_t i_gid; 4835 4834 projid_t i_projid; 4836 4835 4837 - if (((flags & EXT4_IGET_NORMAL) && 4836 + if ((!(flags & EXT4_IGET_SPECIAL) && 4838 4837 (ino < EXT4_FIRST_INO(sb) && ino != EXT4_ROOT_INO)) || 4839 4838 (ino < EXT4_ROOT_INO) || 4840 4839 (ino > le32_to_cpu(EXT4_SB(sb)->s_es->s_inodes_count))) {
+1 -1
fs/ext4/super.c
··· 4902 4902 ext4_superblock_csum_set(sb); 4903 4903 if (sync) 4904 4904 lock_buffer(sbh); 4905 - if (buffer_write_io_error(sbh)) { 4905 + if (buffer_write_io_error(sbh) || !buffer_uptodate(sbh)) { 4906 4906 /* 4907 4907 * Oh, dear. A previous attempt to write the 4908 4908 * superblock failed. This could happen because the