diff options
author | Volker Lendecke <vl@samba.org> | 2013-09-26 14:18:28 -0700 |
---|---|---|
committer | David Disseldorp <ddiss@samba.org> | 2013-10-24 14:22:08 +0200 |
commit | e689b7d51e6ffd848ab10e160dca2c3a03fc750b (patch) | |
tree | 6c78c36c45a9ca41c6fd0fd2d8ec89515efaf316 | |
parent | 7b70fa18734d9ceb020fe3e5d4cc0c26cd27a484 (diff) | |
download | samba-e689b7d51e6ffd848ab10e160dca2c3a03fc750b.tar.gz samba-e689b7d51e6ffd848ab10e160dca2c3a03fc750b.tar.bz2 samba-e689b7d51e6ffd848ab10e160dca2c3a03fc750b.zip |
smbd: Move oplock handling together
Later on we will have all the oplock/sharemode operations in one routine.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
-rw-r--r-- | source3/smbd/open.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 28c2c1c844..8ae2246794 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -2668,13 +2668,6 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, fsp->access_mask = access_mask | FILE_READ_ATTRIBUTES; } - if (file_existed) { - /* stat opens on existing files don't get oplocks. */ - if (is_stat_open(open_access_mask)) { - oplock_request = NO_OPLOCK; - } - } - if (new_file_created) { info = FILE_WAS_CREATED; } else { @@ -2694,6 +2687,13 @@ static NTSTATUS open_file_ntcreate(connection_struct *conn, * file structs. */ + if (file_existed) { + /* stat opens on existing files don't get oplocks. */ + if (is_stat_open(open_access_mask)) { + oplock_request = NO_OPLOCK; + } + } + grant_fsp_oplock_type(fsp, lck, oplock_request); status = set_file_oplock(fsp); |