diff options
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index a4d4a3de31..6378521d76 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -563,14 +563,13 @@ static NTSTATUS fd_open_atomic(struct connection_struct *conn, * Fail if already exists, just pass through. */ status = fd_open(conn, fsp, flags, mode); - if (NT_STATUS_IS_OK(status)) { - /* - * Here we've opened with O_CREAT|O_EXCL - * and got success. We *know* we created - * this file. - */ - *file_created = true; - } + + /* + * Here we've opened with O_CREAT|O_EXCL. If that went + * NT_STATUS_OK, we *know* we created this file. + */ + *file_created = NT_STATUS_IS_OK(status); + return status; } |