aboutsummaryrefslogtreecommitdiff
path: root/nfs/ops.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1997-05-21 16:08:17 +0000
committerThomas Bushnell <thomas@gnu.org>1997-05-21 16:08:17 +0000
commit9da02749e8ee969dd3616cf24c07f670307bc338 (patch)
tree501df10070d856dd7bc64004df07d9d499460fd7 /nfs/ops.c
parentab39a8d37ee7bb738e345037dbe701ca12e47c1c (diff)
downloadhurd-9da02749e8ee969dd3616cf24c07f670307bc338.tar.gz
hurd-9da02749e8ee969dd3616cf24c07f670307bc338.tar.bz2
hurd-9da02749e8ee969dd3616cf24c07f670307bc338.zip
Wed May 21 12:07:24 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* ops.c (netfs_attempt_create_file): Only attempt chown if the create succeeded.
Diffstat (limited to 'nfs/ops.c')
-rw-r--r--nfs/ops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nfs/ops.c b/nfs/ops.c
index 4ecb36a1..9e70a44d 100644
--- a/nfs/ops.c
+++ b/nfs/ops.c
@@ -1042,7 +1042,7 @@ netfs_attempt_create_file (struct iouser *cred, struct node *np,
mutex_lock (&(*newnp)->lock);
}
- if (!netfs_validate_stat (*newnp, -1)
+ if (*newnp && !netfs_validate_stat (*newnp, -1)
&& (*newnp)->nn_stat.st_uid != owner)
netfs_attempt_chown (-1, *newnp, owner, (*newnp)->nn_stat.st_gid);
}