Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347632
b: refs/heads/master
c: face150
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Nov 8, 2012
1 parent 8a23dbf commit 702c907
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: fae5096ad217db2e3368e980c1d86223f786856b
refs/heads/master: face15025ffdf664de95e86ae831544154d26c9c
13 changes: 6 additions & 7 deletions trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,11 +1024,6 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,

if (!EX_ISSYNC(exp))
stable = 0;
if (stable && !use_wgather) {
spin_lock(&file->f_lock);
file->f_flags |= O_SYNC;
spin_unlock(&file->f_lock);
}

/* Write the data. */
oldfs = get_fs(); set_fs(KERNEL_DS);
Expand All @@ -1044,8 +1039,12 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
if (inode->i_mode & (S_ISUID | S_ISGID))
kill_suid(dentry);

if (stable && use_wgather)
host_err = wait_for_concurrent_writes(file);
if (stable) {
if (use_wgather)
host_err = wait_for_concurrent_writes(file);
else
host_err = vfs_fsync_range(file, offset, offset+*cnt, 0);
}

out_nfserr:
dprintk("nfsd: write complete host_err=%d\n", host_err);
Expand Down

0 comments on commit 702c907

Please sign in to comment.