From 9da02749e8ee969dd3616cf24c07f670307bc338 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Wed, 21 May 1997 16:08:17 +0000 Subject: Wed May 21 12:07:24 1997 Thomas Bushnell, n/BSG * ops.c (netfs_attempt_create_file): Only attempt chown if the create succeeded. --- nfs/ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nfs/ops.c') 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); } -- cgit v1.2.3