Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153693
b: refs/heads/master
c: 9d2a3f3
h: refs/heads/master
i:
  153691: 3a2eb47
v: v3
  • Loading branch information
J. Bruce Fields committed Jun 16, 2009
1 parent fd0f619 commit da19405
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 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: 6aad89c8376e432231b78d1bdbcc10ef7708b011
refs/heads/master: 9d2a3f31d6d7832cd441eeda08bc2266cdd5d972
25 changes: 10 additions & 15 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
if (host_err >= 0 && (inode->i_mode & (S_ISUID | S_ISGID)))
kill_suid(dentry);

if (host_err >= 0 && stable) {
if (host_err >= 0 && stable && use_wgather) {
static ino_t last_ino;
static dev_t last_dev;

Expand All @@ -1042,21 +1042,16 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
* nice and simple solution (IMHO), and it seems to
* work:-)
*/
if (use_wgather) {
if (atomic_read(&inode->i_writecount) > 1
|| (last_ino == inode->i_ino && last_dev == inode->i_sb->s_dev)) {
dprintk("nfsd: write defer %d\n", task_pid_nr(current));
msleep(10);
dprintk("nfsd: write resume %d\n", task_pid_nr(current));
}
if (atomic_read(&inode->i_writecount) > 1
|| (last_ino == inode->i_ino && last_dev == inode->i_sb->s_dev)) {
dprintk("nfsd: write defer %d\n", task_pid_nr(current));
msleep(10);
dprintk("nfsd: write resume %d\n", task_pid_nr(current));
}

if (inode->i_state & I_DIRTY) {
dprintk("nfsd: write sync %d\n", task_pid_nr(current));
host_err=nfsd_sync(file);
}
#if 0
wake_up(&inode->i_wait);
#endif
if (inode->i_state & I_DIRTY) {
dprintk("nfsd: write sync %d\n", task_pid_nr(current));
host_err=nfsd_sync(file);
}
last_ino = inode->i_ino;
last_dev = inode->i_sb->s_dev;
Expand Down

0 comments on commit da19405

Please sign in to comment.