]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: check new file size when extending file by fallocate
authorMurphy Zhou <jencce.kernel@gmail.com>
Wed, 18 Mar 2020 12:43:38 +0000 (20:43 +0800)
committerSteve French <stfrench@microsoft.com>
Mon, 23 Mar 2020 03:49:10 +0000 (22:49 -0500)
commit3b7c7e9a774d653143fff4478a3e68d6510c7016
treea6fde4808538a218a0963f3b7f00dc4e7e26f7dd
parent61d2fc2b75d9ada493475ecaceb894cbf4f0771d
CIFS: check new file size when extending file by fallocate

xfstests generic/228 checks if fallocate respect RLIMIT_FSIZE.
After fallocate mode 0 extending enabled, we can hit this failure.
Fix this by check the new file size with vfs helper, return
error if file size is larger then RLIMIT_FSIZE(ulimit -f).

This patch has been tested by LTP/xfstests aginst samba and
Windows server.

Acked-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Murphy Zhou <jencce.kernel@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2ops.c