Skip to content

Commit

Permalink
ext4: rename s_resize_flags to s_ext4_flags
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tytso committed Feb 5, 2017
1 parent 4753d8a commit 9549a16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
10 changes: 7 additions & 3 deletions fs/ext4/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -1399,8 +1399,7 @@ struct ext4_sb_info {
struct journal_s *s_journal;
struct list_head s_orphan;
struct mutex s_orphan_lock;
unsigned long s_resize_flags; /* Flags indicating if there
is a resizer */
unsigned long s_ext4_flags; /* Ext4 superblock flags */
unsigned long s_commit_interval;
u32 s_max_batch_time;
u32 s_min_batch_time;
Expand Down Expand Up @@ -1833,6 +1832,12 @@ static inline bool ext4_has_incompat_features(struct super_block *sb)
return (EXT4_SB(sb)->s_es->s_feature_incompat != 0);
}

/*
* Superblock flags
*/
#define EXT4_FLAGS_RESIZING 0


/*
* Default values for user and/or group using reserved blocks
*/
Expand Down Expand Up @@ -3217,7 +3222,6 @@ static inline void ext4_inode_resume_unlocked_dio(struct inode *inode)
EXT4_WQ_HASH_SZ])
extern wait_queue_head_t ext4__ioend_wq[EXT4_WQ_HASH_SZ];

#define EXT4_RESIZING 0
extern int ext4_resize_begin(struct super_block *sb);
extern void ext4_resize_end(struct super_block *sb);

Expand Down
5 changes: 3 additions & 2 deletions fs/ext4/resize.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,16 @@ int ext4_resize_begin(struct super_block *sb)
return -EPERM;
}

if (test_and_set_bit_lock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags))
if (test_and_set_bit_lock(EXT4_FLAGS_RESIZING,
&EXT4_SB(sb)->s_ext4_flags))
ret = -EBUSY;

return ret;
}

void ext4_resize_end(struct super_block *sb)
{
clear_bit_unlock(EXT4_RESIZING, &EXT4_SB(sb)->s_resize_flags);
clear_bit_unlock(EXT4_FLAGS_RESIZING, &EXT4_SB(sb)->s_ext4_flags);
smp_mb__after_atomic();
}

Expand Down

0 comments on commit 9549a16

Please sign in to comment.