diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/vfs.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 6ad76a4cfc01..1cf70616a11e 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1053,19 +1053,20 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, | |||
1053 | oldfs = get_fs(); set_fs(KERNEL_DS); | 1053 | oldfs = get_fs(); set_fs(KERNEL_DS); |
1054 | host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset); | 1054 | host_err = vfs_writev(file, (struct iovec __user *)vec, vlen, &offset); |
1055 | set_fs(oldfs); | 1055 | set_fs(oldfs); |
1056 | if (host_err >= 0) { | 1056 | if (host_err < 0) |
1057 | *cnt = host_err; | 1057 | goto out_nfserr; |
1058 | nfsdstats.io_write += host_err; | 1058 | *cnt = host_err; |
1059 | fsnotify_modify(file->f_path.dentry); | 1059 | nfsdstats.io_write += host_err; |
1060 | } | 1060 | fsnotify_modify(file->f_path.dentry); |
1061 | 1061 | ||
1062 | /* clear setuid/setgid flag after write */ | 1062 | /* clear setuid/setgid flag after write */ |
1063 | if (host_err >= 0 && (inode->i_mode & (S_ISUID | S_ISGID))) | 1063 | if (inode->i_mode & (S_ISUID | S_ISGID)) |
1064 | kill_suid(dentry); | 1064 | kill_suid(dentry); |
1065 | 1065 | ||
1066 | if (host_err >= 0 && stable && use_wgather) | 1066 | if (stable && use_wgather) |
1067 | host_err = wait_for_concurrent_writes(file); | 1067 | host_err = wait_for_concurrent_writes(file); |
1068 | 1068 | ||
1069 | out_nfserr: | ||
1069 | dprintk("nfsd: write complete host_err=%d\n", host_err); | 1070 | dprintk("nfsd: write complete host_err=%d\n", host_err); |
1070 | if (host_err >= 0) | 1071 | if (host_err >= 0) |
1071 | err = 0; | 1072 | err = 0; |