summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nfs/ChangeLog5
-rw-r--r--nfs/ops.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/nfs/ChangeLog b/nfs/ChangeLog
index e32fc40e..57b34160 100644
--- a/nfs/ChangeLog
+++ b/nfs/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
Tue May 20 15:35:39 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* nfs.c (xdr_encode_create_state): New arg OWNER. Set the owner
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);
}