Commit 2037f368 authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: fix fsync

fsync is allowed to return early if datasync is set and the I_DIRTY_DATASYNC
flags is cleared, not if either of those is true.

Submitted by Christoph Hellwig
parent 5dfa776c
...@@ -35,7 +35,7 @@ int jfs_fsync(struct file *file, struct dentry *dentry, int datasync) ...@@ -35,7 +35,7 @@ int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
if (!(inode->i_state & I_DIRTY)) if (!(inode->i_state & I_DIRTY))
return rc; return rc;
if (datasync || !(inode->i_state & I_DIRTY_DATASYNC)) if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
return rc; return rc;
IWRITE_LOCK(inode); IWRITE_LOCK(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment