]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/gfs2/file.c
GFS2: dirty inode correctly in gfs2_write_end
[karo-tx-linux.git] / fs / gfs2 / file.c
index 72c3866a73205217b9fe57d7863ce2376ce8002b..0621b46d474d0e6d82157e6701b3e49449839908 100644 (file)
@@ -650,7 +650,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
 {
        struct address_space *mapping = file->f_mapping;
        struct inode *inode = mapping->host;
-       int sync_state = inode->i_state & (I_DIRTY_SYNC|I_DIRTY_DATASYNC);
+       int sync_state = inode->i_state & I_DIRTY;
        struct gfs2_inode *ip = GFS2_I(inode);
        int ret = 0, ret1 = 0;
 
@@ -660,6 +660,8 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
                        return ret1;
        }
 
+       if (!gfs2_is_jdata(ip))
+               sync_state &= ~I_DIRTY_PAGES;
        if (datasync)
                sync_state &= ~I_DIRTY_SYNC;