ksmbd: remove getting worker state macros
authorHyunchul Lee <hyc.lee@gmail.com>
Thu, 24 Jun 2021 22:02:10 +0000 (07:02 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Tue, 29 Jun 2021 06:05:50 +0000 (15:05 +0900)
Remove getting worker state macros

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/ksmbd/ksmbd_work.h
fs/ksmbd/smb2pdu.c

index 0e2d4f3..a91abd4 100644 (file)
@@ -86,10 +86,6 @@ struct ksmbd_work {
        struct list_head                interim_entry;
 };
 
-#define WORK_CANCELLED(w)      ((w)->state == KSMBD_WORK_CANCELLED)
-#define WORK_CLOSED(w)         ((w)->state == KSMBD_WORK_CLOSED)
-#define WORK_ACTIVE(w)         ((w)->state == KSMBD_WORK_ACTIVE)
-
 #define RESPONSE_BUF_NEXT(w)   \
        (((w)->response_buf + (w)->next_smb2_rsp_hdr_off))
 #define REQUEST_BUF_NEXT(w)    \
index 25715d5..38a3639 100644 (file)
@@ -6716,12 +6716,12 @@ skip:
 
                                err = ksmbd_vfs_posix_lock_wait(flock);
 
-                               if (!WORK_ACTIVE(work)) {
+                               if (work->state != KSMBD_WORK_ACTIVE) {
                                        list_del(&smb_lock->llist);
                                        list_del(&smb_lock->glist);
                                        locks_free_lock(flock);
 
-                                       if (WORK_CANCELLED(work)) {
+                                       if (work->state == KSMBD_WORK_CANCELLED) {
                                                spin_lock(&fp->f_lock);
                                                list_del(&work->fp_entry);
                                                spin_unlock(&fp->f_lock);