Commit 74e934ba authored by Linus Torvalds's avatar Linus Torvalds

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
parents e14679b6 44a52022
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/printk.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mbcache.h> #include <linux/mbcache.h>
#include <linux/quotaops.h> #include <linux/quotaops.h>
...@@ -84,8 +85,8 @@ ...@@ -84,8 +85,8 @@
printk("\n"); \ printk("\n"); \
} while (0) } while (0)
#else #else
# define ea_idebug(f...) # define ea_idebug(inode, f...) no_printk(f)
# define ea_bdebug(f...) # define ea_bdebug(bh, f...) no_printk(f)
#endif #endif
static int ext2_xattr_set2(struct inode *, struct buffer_head *, static int ext2_xattr_set2(struct inode *, struct buffer_head *,
...@@ -790,7 +791,15 @@ ext2_xattr_delete_inode(struct inode *inode) ...@@ -790,7 +791,15 @@ ext2_xattr_delete_inode(struct inode *inode)
struct buffer_head *bh = NULL; struct buffer_head *bh = NULL;
struct ext2_sb_info *sbi = EXT2_SB(inode->i_sb); struct ext2_sb_info *sbi = EXT2_SB(inode->i_sb);
down_write(&EXT2_I(inode)->xattr_sem); /*
* We are the only ones holding inode reference. The xattr_sem should
* better be unlocked! We could as well just not acquire xattr_sem at
* all but this makes the code more futureproof. OTOH we need trylock
* here to avoid false-positive warning from lockdep about reclaim
* circular dependency.
*/
if (WARN_ON_ONCE(!down_write_trylock(&EXT2_I(inode)->xattr_sem)))
return;
if (!EXT2_I(inode)->i_file_acl) if (!EXT2_I(inode)->i_file_acl)
goto cleanup; goto cleanup;
...@@ -864,8 +873,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh) ...@@ -864,8 +873,7 @@ ext2_xattr_cache_insert(struct mb_cache *cache, struct buffer_head *bh)
true); true);
if (error) { if (error) {
if (error == -EBUSY) { if (error == -EBUSY) {
ea_bdebug(bh, "already in cache (%d cache entries)", ea_bdebug(bh, "already in cache");
atomic_read(&ext2_xattr_cache->c_entry_count));
error = 0; error = 0;
} }
} else } else
......
...@@ -39,7 +39,7 @@ struct ext2_xattr_entry { ...@@ -39,7 +39,7 @@ struct ext2_xattr_entry {
__le32 e_value_block; /* disk block attribute is stored on (n/i) */ __le32 e_value_block; /* disk block attribute is stored on (n/i) */
__le32 e_value_size; /* size of attribute value */ __le32 e_value_size; /* size of attribute value */
__le32 e_hash; /* hash value of name and value */ __le32 e_hash; /* hash value of name and value */
char e_name[0]; /* attribute name */ char e_name[]; /* attribute name */
}; };
#define EXT2_XATTR_PAD_BITS 2 #define EXT2_XATTR_PAD_BITS 2
......
...@@ -83,7 +83,7 @@ struct udf_virtual_data { ...@@ -83,7 +83,7 @@ struct udf_virtual_data {
struct udf_bitmap { struct udf_bitmap {
__u32 s_extPosition; __u32 s_extPosition;
int s_nr_groups; int s_nr_groups;
struct buffer_head *s_block_bitmap[0]; struct buffer_head *s_block_bitmap[];
}; };
struct udf_part_map { struct udf_part_map {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment