Skip to content

Commit

Permalink
ksmbd: opencode to remove ATTR_FP macro
Browse files Browse the repository at this point in the history
Opencode to remove ATTR_FP macro.

Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Namjae Jeon <[email protected]>
Signed-off-by: Steve French <[email protected]>
  • Loading branch information
namjaejeon committed Jun 29, 2021
1 parent 12202c0 commit 849fbc5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 3 additions & 1 deletion fs/ksmbd/oplock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,9 @@ int smb_grant_oplock(struct ksmbd_work *work, int req_op_level, u64 pid,
goto set_lev;

/* grant none-oplock if second open is trunc */
if (ATTR_FP(fp)) {
if (fp->attrib_only && fp->cdoption != FILE_OVERWRITE_IF_LE &&
fp->cdoption != FILE_OVERWRITE_LE &&
fp->cdoption != FILE_SUPERSEDE_LE) {
req_op_level = SMB2_OPLOCK_LEVEL_NONE;
goto set_lev;
}
Expand Down
5 changes: 0 additions & 5 deletions fs/ksmbd/vfs_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@
#define KSMBD_NO_FID (UINT_MAX)
#define SMB2_NO_FID (0xFFFFFFFFFFFFFFFFULL)

#define ATTR_FP(fp) ((fp)->attrib_only && \
((fp)->cdoption != FILE_OVERWRITE_IF_LE && \
(fp)->cdoption != FILE_OVERWRITE_LE && \
(fp)->cdoption != FILE_SUPERSEDE_LE))

struct ksmbd_conn;
struct ksmbd_session;

Expand Down

0 comments on commit 849fbc5

Please sign in to comment.