]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:ntvfs: Remove dead code path
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 5 Oct 2023 21:10:16 +0000 (10:10 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 13 Oct 2023 02:18:31 +0000 (02:18 +0000)
‘pending’ will never be NULL.

View with ‘git show -b’.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/ntvfs/posix/pvfs_lock.c

index c113232248e9ca4aba73a895b7e090edb099bb50..0802dedc67672682926eb37d6d540b1f8432f96f 100644 (file)
@@ -182,24 +182,19 @@ static void pvfs_pending_lock_continue(void *private_data, enum pvfs_wait_notice
                                  locks[i].count,
                                  rw, pending);
                if (!NT_STATUS_IS_OK(status)) {
-                       if (pending) {
-                               /* a timed lock failed - setup a wait message to handle
-                                  the pending lock notification or a timeout */
-                               pending->wait_handle = pvfs_wait_message(pvfs, req, MSG_BRL_RETRY, 
-                                                                        pending->end_time,
-                                                                        pvfs_pending_lock_continue,
-                                                                        pending);
-                               if (pending->wait_handle == NULL) {
-                                       pvfs_lock_async_failed(pvfs, req, f, locks, i, NT_STATUS_NO_MEMORY);
-                                       talloc_free(pending);
-                               } else {
-                                       talloc_steal(pending, pending->wait_handle);
-                                       DLIST_ADD(f->pending_list, pending);
-                               }
-                               return;
+                       /* a timed lock failed - setup a wait message to handle
+                          the pending lock notification or a timeout */
+                       pending->wait_handle = pvfs_wait_message(pvfs, req, MSG_BRL_RETRY,
+                                                                pending->end_time,
+                                                                pvfs_pending_lock_continue,
+                                                                pending);
+                       if (pending->wait_handle == NULL) {
+                               pvfs_lock_async_failed(pvfs, req, f, locks, i, NT_STATUS_NO_MEMORY);
+                               talloc_free(pending);
+                       } else {
+                               talloc_steal(pending, pending->wait_handle);
+                               DLIST_ADD(f->pending_list, pending);
                        }
-                       pvfs_lock_async_failed(pvfs, req, f, locks, i, status);
-                       talloc_free(pending);
                        return;
                }