Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 322622
b: refs/heads/master
c: 7b281ee
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Sep 11, 2012
1 parent 0f1dbbd commit 641b5cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f39c1bfb5a03e2d255451bff05be0d7255298fa4
refs/heads/master: 7b281ee026552f10862b617a2a51acf49c829554
4 changes: 3 additions & 1 deletion trunk/fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,12 @@ nfs_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
struct inode *inode = file->f_path.dentry->d_inode;

ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret != 0)
goto out;
mutex_lock(&inode->i_mutex);
ret = nfs_file_fsync_commit(file, start, end, datasync);
mutex_unlock(&inode->i_mutex);

out:
return ret;
}

Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/nfs/nfs4file.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ nfs4_file_fsync(struct file *file, loff_t start, loff_t end, int datasync)
struct inode *inode = file->f_path.dentry->d_inode;

ret = filemap_write_and_wait_range(inode->i_mapping, start, end);
if (ret != 0)
goto out;
mutex_lock(&inode->i_mutex);
ret = nfs_file_fsync_commit(file, start, end, datasync);
if (!ret && !datasync)
/* application has asked for meta-data sync */
ret = pnfs_layoutcommit_inode(inode, true);
mutex_unlock(&inode->i_mutex);

out:
return ret;
}

Expand Down

0 comments on commit 641b5cc

Please sign in to comment.