smb/server: fix unbuffered file position alignment check
Subsystems (2)
ChenXiaoSong
reviewerPATCH 1/1 smb/server: fix unbuffered file position alignment check
From: ChenXiaoSong <[email protected]>
FILE_NO_INTERMEDIATE_BUFFERING is a CreateOptions flag and can be combined with other flags, such as FILE_NON_DIRECTORY_FILE.
Signed-off-by ChenXiaoSong <[email protected]>
--- fs/smb/server/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/server/smb2pdu.c +1 -1
@@ -7915,7 +7915,7 @@ static int set_file_position_info(struct ksmbd_file *fp, sector_size = inode->i_sb->s_blocksize;if (current_byte_offset <0 || - (fp->coption ==FILE_NO_INTERMEDIATE_BUFFERING_LE && + (fp->coption &FILE_NO_INTERMEDIATE_BUFFERING_LE && current_byte_offset & (sector_size -1 ))) {pr_err ("CurrentByteOffset is not valid : %llu\n" , current_byte_offset);
Signature · 1 line
2.54.0
Quoted 7 lines · ChenXiaoSong
From: ChenXiaoSong <[email protected]>
FILE_NO_INTERMEDIATE_BUFFERINGis a CreateOptions flag and can be combined with other flags, such asFILE_NON_DIRECTORY_FILE.Signed-off-by ChenXiaoSong <[email protected]>
Applied it to #ksmbd-for-next-next.
Thanks!