Commit 902df8e1 authored by Dave Kleikamp's avatar Dave Kleikamp

Merge jfs@jfs.bkbits.net:linux-2.5

into shaggy.austin.ibm.com:/home/shaggy/bk/jfs-2.5
parents 2ef21770 816046ef
......@@ -34,10 +34,12 @@ int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
struct inode *inode = dentry->d_inode;
int rc = 0;
if (!(inode->i_state & I_DIRTY))
return rc;
if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
if (!(inode->i_state & I_DIRTY) ||
(datasync && !(inode->i_state & I_DIRTY_DATASYNC))) {
/* Make sure committed changes hit the disk */
jfs_flush_journal(JFS_SBI(inode->i_sb)->log, 1);
return rc;
}
rc |= jfs_commit_inode(inode, 1);
......
......@@ -107,14 +107,18 @@ int jfs_commit_inode(struct inode *inode, int wait)
void jfs_write_inode(struct inode *inode, int wait)
{
if (test_cflag(COMMIT_Nolink, inode))
return;
/*
* If COMMIT_DIRTY is not set, the inode isn't really dirty.
* It has been committed since the last change, but was still
* on the dirty inode list
* on the dirty inode list.
*/
if (test_cflag(COMMIT_Nolink, inode) ||
!test_cflag(COMMIT_Dirty, inode))
if (!test_cflag(COMMIT_Dirty, inode)) {
/* Make sure committed changes hit the disk */
jfs_flush_journal(JFS_SBI(inode->i_sb)->log, wait);
return;
}
if (jfs_commit_inode(inode, wait)) {
jfs_err("jfs_write_inode: jfs_commit_inode failed!");
......
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