]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/gfs2/file.c
vfs: add support for a lazytime mount option
[mirror_ubuntu-zesty-kernel.git] / fs / gfs2 / file.c
index 6e600abf694a20f327a7a025c670954002745453..15c44cf457ccffd6e55145c8e2e10bd235bc4655 100644 (file)
@@ -655,7 +655,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;
+       int sync_state = inode->i_state & I_DIRTY_ALL;
        struct gfs2_inode *ip = GFS2_I(inode);
        int ret = 0, ret1 = 0;
 
@@ -668,7 +668,7 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
        if (!gfs2_is_jdata(ip))
                sync_state &= ~I_DIRTY_PAGES;
        if (datasync)
-               sync_state &= ~I_DIRTY_SYNC;
+               sync_state &= ~(I_DIRTY_SYNC | I_DIRTY_TIME);
 
        if (sync_state) {
                ret = sync_inode_metadata(inode, 1);