ext4: Clean up s_dirt handling
[cascardo/linux.git] / fs / ext4 / file.c
index d0776e4..bd411c1 100644 (file)
@@ -66,7 +66,7 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
         * is smaller than s_maxbytes, which is for extent-mapped files.
         */
 
-       if (!(EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) {
+       if (!(ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))) {
                struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
                size_t length = iov_length(iov, nr_segs);
 
@@ -123,7 +123,7 @@ static int ext4_file_open(struct inode * inode, struct file * filp)
                if (!IS_ERR(cp)) {
                        memcpy(sbi->s_es->s_last_mounted, cp,
                               sizeof(sbi->s_es->s_last_mounted));
-                       sb->s_dirt = 1;
+                       ext4_mark_super_dirty(sb);
                }
        }
        return dquot_file_open(inode, filp);