diff options
Diffstat (limited to 'source3/smbd/oplock.c')
-rw-r--r-- | source3/smbd/oplock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index e794d2d923..28ab29d027 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -1304,10 +1304,10 @@ BOOL attempt_close_oplocked_file(files_struct *fsp) DEBUG(5,("attempt_close_oplocked_file: checking file %s.\n", fsp->fsp_name)); - if (fsp->open && EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && !fsp->sent_oplock_break && (fsp->fd != -1)) { + if (EXCLUSIVE_OPLOCK_TYPE(fsp->oplock_type) && !fsp->sent_oplock_break && (fsp->fd != -1)) { /* Try and break the oplock. */ if (oplock_break(fsp->dev, fsp->inode, &fsp->open_time, True)) { - if(!fsp->open) /* Did the oplock break close the file ? */ + if(file_find_fsp(fsp) == NULL) /* Did the oplock break close the file ? */ return True; } } |