summaryrefslogtreecommitdiff
path: root/nfs/ops.c
diff options
context:
space:
mode:
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);
}