Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c8e3fe3 authored by Amir Goldstein's avatar Amir Goldstein Committed by Theodore Ts'o
Browse files

vfs: add the sb_start_intwrite_trylock() helper



Needed by ext4 to test frozen fs before updating s_last_mounted.

Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
parent eee597ac
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1597,6 +1597,11 @@ static inline void sb_start_intwrite(struct super_block *sb)
	__sb_start_write(sb, SB_FREEZE_FS, true);
}

static inline int sb_start_intwrite_trylock(struct super_block *sb)
{
	return __sb_start_write(sb, SB_FREEZE_FS, false);
}


extern bool inode_owner_or_capable(const struct inode *inode);