Merge tag 'idmapped-mounts-v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git...
[platform/kernel/linux-rpi.git] / fs / ext4 / inode.c
index 8fbf85b..650c5ac 100644 (file)
@@ -4962,15 +4962,11 @@ static void __ext4_update_other_inode_time(struct super_block *sb,
        if (!inode)
                return;
 
-       if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
-                              I_DIRTY_INODE)) ||
-           ((inode->i_state & I_DIRTY_TIME) == 0))
+       if (!inode_is_dirtytime_only(inode))
                return;
 
        spin_lock(&inode->i_lock);
-       if (((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
-                               I_DIRTY_INODE)) == 0) &&
-           (inode->i_state & I_DIRTY_TIME)) {
+       if (inode_is_dirtytime_only(inode)) {
                struct ext4_inode_info  *ei = EXT4_I(inode);
 
                inode->i_state &= ~I_DIRTY_TIME;
@@ -5940,26 +5936,16 @@ out:
  * If the inode is marked synchronous, we don't honour that here - doing
  * so would cause a commit on atime updates, which we don't bother doing.
  * We handle synchronous inodes at the highest possible level.
- *
- * If only the I_DIRTY_TIME flag is set, we can skip everything.  If
- * I_DIRTY_TIME and I_DIRTY_SYNC is set, the only inode fields we need
- * to copy into the on-disk inode structure are the timestamp files.
  */
 void ext4_dirty_inode(struct inode *inode, int flags)
 {
        handle_t *handle;
 
-       if (flags == I_DIRTY_TIME)
-               return;
        handle = ext4_journal_start(inode, EXT4_HT_INODE, 2);
        if (IS_ERR(handle))
-               goto out;
-
+               return;
        ext4_mark_inode_dirty(handle, inode);
-
        ext4_journal_stop(handle);
-out:
-       return;
 }
 
 int ext4_change_inode_journal_flag(struct inode *inode, int val)