From 53b6f0b6c41fe8e33fdd27cdd380b80ce71769e1 Mon Sep 17 00:00:00 2001 From: Hisashi Hifumi Date: Thu, 17 Apr 2008 10:38:59 -0400 Subject: [PATCH] --- yaml --- r: 95021 b: refs/heads/master c: 53c550e9750434ddc4275fe0405170e0d1b46731 h: refs/heads/master i: 95019: 2b58ce8182d203cbe64b409043af2b3b8460e27f v: v3 --- [refs] | 2 +- trunk/fs/ext4/fsync.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 87adc9ee0de6..2460deb32ea7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 97bd42b9c8be748ad85b362ba3bd401f4d35be80 +refs/heads/master: 53c550e9750434ddc4275fe0405170e0d1b46731 diff --git a/trunk/fs/ext4/fsync.c b/trunk/fs/ext4/fsync.c index 8d50879d1c2c..a04a1ac4e0cf 100644 --- a/trunk/fs/ext4/fsync.c +++ b/trunk/fs/ext4/fsync.c @@ -72,6 +72,9 @@ int ext4_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.