diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-04-01 11:40:23 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-04-07 12:29:29 +0200 |
commit | 851cadba51b00b326c5f040f23f95932aec53105 (patch) | |
tree | 9f89c0c7616a455e81064cb23cdcb9f35392162b /source3/smbd/filename.c | |
parent | 406da3a9628f7e631ad17ec3c37c841359d0ccbf (diff) | |
download | samba-851cadba51b00b326c5f040f23f95932aec53105.tar.gz samba-851cadba51b00b326c5f040f23f95932aec53105.tar.xz samba-851cadba51b00b326c5f040f23f95932aec53105.zip |
locking: combine get_delete_on_close_flag() and get_write_time() into get_file_infos()
This means we need to fetch the record only once.
metze
(This used to be commit 4130b873291d39e363184fe4e38dc1f24ebe5056)
Diffstat (limited to 'source3/smbd/filename.c')
-rw-r--r-- | source3/smbd/filename.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/source3/smbd/filename.c b/source3/smbd/filename.c index 10e95830490..4323e843d21 100644 --- a/source3/smbd/filename.c +++ b/source3/smbd/filename.c @@ -611,11 +611,19 @@ NTSTATUS unix_convert(TALLOC_CTX *ctx, } /* end else */ #ifdef DEVELOPER - if (VALID_STAT(st) && - get_delete_on_close_flag(vfs_file_id_from_sbuf(conn, - &st))) { - result = NT_STATUS_DELETE_PENDING; - goto fail; + /* + * This sucks! + * We should never provide different behaviors + * depending on DEVELOPER!!! + */ + if (VALID_STAT(st)) { + bool delete_pending; + get_file_infos(vfs_file_id_from_sbuf(conn, &st), + &delete_pending, NULL); + if (delete_pending) { + result = NT_STATUS_DELETE_PENDING; + goto fail; + } } #endif |