Don't modify the fsp in fd_close_posix() anymore.
authorMichael Adam <obnox@samba.org>
Fri, 11 Jan 2008 12:03:16 +0000 (13:03 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 20 Apr 2008 22:21:24 +0000 (00:21 +0200)
Now that it is inside the vfs layer, this function should
not alter the fsp (i.e. set fsp->fh->fd = -1) anymore.
That belongs above the vfs layer.

Michael
(This used to be commit df264bf3e00d7d77afcf55e54d2669b9ffa9af4a)

source3/locking/posix.c

index f42d1ec6f8a513cf04c75ade19a2bb3bef5c7815..844a86e8636ae14f77c1d3deddae039727841427 100644 (file)
@@ -621,7 +621,6 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
                 * just close.
                 */
                ret = close(fsp->fh->fd);
-               fsp->fh->fd = -1;
                if (ret == -1) {
                        return map_nt_error_from_unix(errno);
                }
@@ -636,7 +635,6 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
                 */
 
                add_fd_to_close_entry(fsp);
-               fsp->fh->fd = -1;
                return NT_STATUS_OK;
        }
 
@@ -680,8 +678,6 @@ NTSTATUS fd_close_posix(struct files_struct *fsp)
                ret = -1;
        } 
 
-       fsp->fh->fd = -1;
-
        if (ret == -1) {
                return map_nt_error_from_unix(errno);
        }