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

ext4: rename s_resize_flags to s_ext4_flags

We are currently using one bit in s_resize_flags; rename it in order
to allow more of the bits in that unsigned long for other purposes.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>

+10 -5
+7 -3
fs/ext4/ext4.h
··· 1399 1399 struct journal_s *s_journal; 1400 1400 struct list_head s_orphan; 1401 1401 struct mutex s_orphan_lock; 1402 - unsigned long s_resize_flags; /* Flags indicating if there 1403 - is a resizer */ 1402 + unsigned long s_ext4_flags; /* Ext4 superblock flags */ 1404 1403 unsigned long s_commit_interval; 1405 1404 u32 s_max_batch_time; 1406 1405 u32 s_min_batch_time; ··· 1831 1832 { 1832 1833 return (EXT4_SB(sb)->s_es->s_feature_incompat != 0); 1833 1834 } 1835 + 1836 + /* 1837 + * Superblock flags 1838 + */ 1839 + #define EXT4_FLAGS_RESIZING 0 1840 + 1834 1841 1835 1842 /* 1836 1843 * Default values for user and/or group using reserved blocks ··· 3222 3217 EXT4_WQ_HASH_SZ]) 3223 3218 extern wait_queue_head_t ext4__ioend_wq[EXT4_WQ_HASH_SZ]; 3224 3219 3225 - #define EXT4_RESIZING 0 3226 3220 extern int ext4_resize_begin(struct super_block *sb); 3227 3221 extern void ext4_resize_end(struct super_block *sb); 3228 3222
+3 -2
fs/ext4/resize.c
··· 45 45 return -EPERM; 46 46 } 47 47 48 - if (test_and_set_bit_lock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags)) 48 + if (test_and_set_bit_lock(EXT4_FLAGS_RESIZING, 49 + &EXT4_SB(sb)->s_ext4_flags)) 49 50 ret = -EBUSY; 50 51 51 52 return ret; ··· 54 53 55 54 void ext4_resize_end(struct super_block *sb) 56 55 { 57 - clear_bit_unlock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags); 56 + clear_bit_unlock(EXT4_FLAGS_RESIZING, &EXT4_SB(sb)->s_ext4_flags); 58 57 smp_mb__after_atomic(); 59 58 } 60 59