X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fext3%2Ffsync.c;h=d33634119e17e893eeff553781ef0307389c35f4;hb=d6817cdbd143f87f9d7c59a4c3194091190eeb84;hp=a588e23841d4e68323d2604e70ad92ec227923c6;hpb=70180659a479b55387eca8cc1fa7024ba8410b14;p=linux-2.6 diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c index a588e23841..d33634119e 100644 --- a/fs/ext3/fsync.c +++ b/fs/ext3/fsync.c @@ -72,6 +72,9 @@ int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync) goto out; } + if (datasync && !(inode->i_state & I_DIRTY_DATASYNC)) + goto out; + /* * The VFS has written the file data. If the inode is unaltered * then we need not start a commit.