From a3b1e1280cbd7572243c87a5be45cdc8040d726c Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 13 May 2018 22:43:56 -0400 Subject: [PATCH] add patch add-the-sb_start_intwrite_trylock-helper --- add-the-sb_start_intwrite_trylock-helper | 33 ++++++++++++++++++++++++++++++++ series | 1 + timestamps | 9 +++++---- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 add-the-sb_start_intwrite_trylock-helper diff --git a/add-the-sb_start_intwrite_trylock-helper b/add-the-sb_start_intwrite_trylock-helper new file mode 100644 index 00000000..3fc27df4 --- /dev/null +++ b/add-the-sb_start_intwrite_trylock-helper @@ -0,0 +1,33 @@ +vfs: add the sb_start_intwrite_trylock() helper + +From: Amir Goldstein + +Needed by ext4 to test frozen fs before updating s_last_mounted. + +Signed-off-by: Amir Goldstein +Signed-off-by: Theodore Ts'o +Reviewed-by: Jan Kara +--- + include/linux/fs.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/include/linux/fs.h b/include/linux/fs.h +index 760d8da1b6c7..cac41f1bad05 100644 +--- 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); + +-- +2.7.4 + + diff --git a/series b/series index b48a0412..73428453 100644 --- a/series +++ b/series @@ -11,6 +11,7 @@ fix-hole-length-detectin-in-ext4_ind_map_blocks add-new-return-type-vm_fault_t add-verifier-check-for-symlink-with-append-immtable-flags update-mtime-in-ext4_punch_hole-even-if-no-blocks-removed +add-the-sb_start_intwrite_trylock-helper #################################################### # unstable patches diff --git a/timestamps b/timestamps index 39f6f739..59e0a6aa 100755 --- a/timestamps +++ b/timestamps @@ -36,7 +36,6 @@ touch -d @1523242125 add-ext4-journal-lazy-mount-option touch -d @1525967404 make-ext4_getfsmap_find_fixed_metadata-static touch -d @1525967534 use-XATTR_CREATE-in-ext4_initxattrs touch -d @1525967731 use-raw_iversion-value-for-ea_inode -touch -d @1525967791 stable-boundary touch -d @1526139301 fix-wrong-return-value-in-ext4_read_inode_bitmap touch -d @1526139580 new-ext4_mark_group_bitmap_corrupted-helper touch -d @1526141721 mark-inode-bitmap-corrupted-when-found @@ -45,6 +44,8 @@ touch -d @1526169300 fix-hole-length-detectin-in-ext4_ind_map_blocks touch -d @1526241709 add-new-return-type-vm_fault_t touch -d @1526244356 add-verifier-check-for-symlink-with-append-immtable-flags touch -d @1526254115 update-mtime-in-ext4_punch_hole-even-if-no-blocks-removed -touch -d @1526254144 series -touch -d @1526254149 status -touch -d @1526265641 timestamps +touch -d @1526254175 stable-boundary +touch -d @1526265630 add-the-sb_start_intwrite_trylock-helper +touch -d @1526265755 series +touch -d @1526265759 status +touch -d @1526265825 timestamps -- 2.11.4.GIT