Skip to content

Commit

Permalink
ksmbd: remove getting worker state macros
Browse files Browse the repository at this point in the history
Remove getting worker state macros

Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Hyunchul Lee <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
hclee authored and namjaejeon committed Jun 29, 2021
1 parent cb5b047 commit d4075ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions fs/ksmbd/ksmbd_work.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down
4 changes: 2 additions & 2 deletions fs/ksmbd/smb2pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -6716,12 +6716,12 @@ int smb2_lock(struct ksmbd_work *work)

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);
Expand Down

0 comments on commit d4075ab

Please sign in to comment.