ext4: Simplify the usage of clear_opt() and set_opt() macros
Change clear_opt() and set_opt() to take a superblock pointer instead of a pointer to EXT4_SB(sb)->s_mount_opt. This makes it easier for us to support a second mount option field. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
@ -917,8 +917,10 @@ struct ext4_inode_info {
|
||||
#define EXT4_MOUNT_DISCARD 0x40000000 /* Issue DISCARD requests */
|
||||
#define EXT4_MOUNT_INIT_INODE_TABLE 0x80000000 /* Initialize uninitialized itables */
|
||||
|
||||
#define clear_opt(o, opt) o &= ~EXT4_MOUNT_##opt
|
||||
#define set_opt(o, opt) o |= EXT4_MOUNT_##opt
|
||||
#define clear_opt(sb, opt) EXT4_SB(sb)->s_mount_opt &= \
|
||||
~EXT4_MOUNT_##opt
|
||||
#define set_opt(sb, opt) EXT4_SB(sb)->s_mount_opt |= \
|
||||
EXT4_MOUNT_##opt
|
||||
#define test_opt(sb, opt) (EXT4_SB(sb)->s_mount_opt & \
|
||||
EXT4_MOUNT_##opt)
|
||||
|
||||
|
Reference in New Issue
Block a user