projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eee597a
)
vfs: add the sb_start_intwrite_trylock() helper
author
Amir Goldstein
<amir73il@gmail.com>
Mon, 14 May 2018 02:40:30 +0000
(22:40 -0400)
committer
Theodore Ts'o
<tytso@mit.edu>
Mon, 14 May 2018 02:40:30 +0000
(22:40 -0400)
Needed by ext4 to test frozen fs before updating s_last_mounted.
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
include/linux/fs.h
patch
|
blob
|
history
diff --git
a/include/linux/fs.h
b/include/linux/fs.h
index 760d8da1b6c7dc8b6d16703e1f65de918ec8460e..cac41f1bad0520027b5ad291aca556385fffcfe8 100644
(file)
--- a/
include/linux/fs.h
+++ b/
include/linux/fs.h
@@
-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);