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 'for_v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull ext2/udf updates from Jan Kara:
"Cleanups and fixes for ext2 and one cleanup for udf"

* tag 'for_v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
ext2: fix empty body warnings when -Wextra is used
ext2: fix debug reference to ext2_xattr_cache
udf: udf_sb.h: Replace zero-length array with flexible-array member
ext2: xattr.h: Replace zero-length array with flexible-array member
ext2: Silence lockdep warning about reclaim under xattr_sem

+15 -7
+13 -5
fs/ext2/xattr.c
··· 56 56 57 57 #include <linux/buffer_head.h> 58 58 #include <linux/init.h> 59 + #include <linux/printk.h> 59 60 #include <linux/slab.h> 60 61 #include <linux/mbcache.h> 61 62 #include <linux/quotaops.h> ··· 85 84 printk("\n"); \ 86 85 } while (0) 87 86 #else 88 - # define ea_idebug(f...) 89 - # define ea_bdebug(f...) 87 + # define ea_idebug(inode, f...) no_printk(f) 88 + # define ea_bdebug(bh, f...) no_printk(f) 90 89 #endif 91 90 92 91 static int ext2_xattr_set2(struct inode *, struct buffer_head *, ··· 791 790 struct buffer_head *bh = NULL; 792 791 struct ext2_sb_info *sbi = EXT2_SB(inode->i_sb); 793 792 794 - down_write(&EXT2_I(inode)->xattr_sem); 793 + /* 794 + * We are the only ones holding inode reference. The xattr_sem should 795 + * better be unlocked! We could as well just not acquire xattr_sem at 796 + * all but this makes the code more futureproof. OTOH we need trylock 797 + * here to avoid false-positive warning from lockdep about reclaim 798 + * circular dependency. 799 + */ 800 + if (WARN_ON_ONCE(!down_write_trylock(&EXT2_I(inode)->xattr_sem))) 801 + return; 795 802 if (!EXT2_I(inode)->i_file_acl) 796 803 goto cleanup; 797 804 ··· 873 864 true); 874 865 if (error) { 875 866 if (error == -EBUSY) { 876 - ea_bdebug(bh, "already in cache (%d cache entries)", 877 - atomic_read(&ext2_xattr_cache->c_entry_count)); 867 + ea_bdebug(bh, "already in cache"); 878 868 error = 0; 879 869 } 880 870 } else
+1 -1
fs/ext2/xattr.h
··· 39 39 __le32 e_value_block; /* disk block attribute is stored on (n/i) */ 40 40 __le32 e_value_size; /* size of attribute value */ 41 41 __le32 e_hash; /* hash value of name and value */ 42 - char e_name[0]; /* attribute name */ 42 + char e_name[]; /* attribute name */ 43 43 }; 44 44 45 45 #define EXT2_XATTR_PAD_BITS 2
+1 -1
fs/udf/udf_sb.h
··· 83 83 struct udf_bitmap { 84 84 __u32 s_extPosition; 85 85 int s_nr_groups; 86 - struct buffer_head *s_block_bitmap[0]; 86 + struct buffer_head *s_block_bitmap[]; 87 87 }; 88 88 89 89 struct udf_part_map {