diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-07-30 22:57:38 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-07-30 22:57:38 +0000 |
commit | b0fb6f99499029d3fc3113fbb8dc91b3e9ca6bc2 (patch) | |
tree | dab2900939436b1d9585d177add32ddd9116280c /sys/fs/nfsclient | |
parent | 16484690884efd6341d529d335b9faf17bef69bb (diff) | |
download | FreeBSD-src-b0fb6f99499029d3fc3113fbb8dc91b3e9ca6bc2.zip FreeBSD-src-b0fb6f99499029d3fc3113fbb8dc91b3e9ca6bc2.tar.gz |
The new NFS client failed to vput() the new vnode if a setattr
failed after the file was created in nfs_create(). This would
probably only happen during a forced dismount. The old NFS client
does have a vput() for this case. Detected by pho during recent
testing, where an open syscall returned with a vnode still locked.
Tested by: pho
Approved by: re (kib)
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-rw-r--r-- | sys/fs/nfsclient/nfs_clvnops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index a69c76e..7e87b6e 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1596,6 +1596,8 @@ again: if (attrflag) (void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL, 0, 1); + if (error != 0) + vput(newvp); } } if (!error) { |