Skip to content

Commit f3438b4

Browse files
committed
Merge tag '5.14-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull cifs fixes from Steve French: "Three cifs/smb3 fixes, including two for stable, and a fix for an fallocate problem noticed by Clang" * tag '5.14-rc3-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6: cifs: add missing parsing of backupuid smb3: rc uninitialized in one fallocate path SMB3: fix readpage for large swap cache
2 parents c7d1022 + b946dbc commit f3438b4

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

fs/cifs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4619,7 +4619,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
46194619

46204620
static int cifs_readpage(struct file *file, struct page *page)
46214621
{
4622-
loff_t offset = (loff_t)page->index << PAGE_SHIFT;
4622+
loff_t offset = page_file_offset(page);
46234623
int rc = -EACCES;
46244624
unsigned int xid;
46254625

fs/cifs/fs_context.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
925925
ctx->cred_uid = uid;
926926
ctx->cruid_specified = true;
927927
break;
928+
case Opt_backupuid:
929+
uid = make_kuid(current_user_ns(), result.uint_32);
930+
if (!uid_valid(uid))
931+
goto cifs_parse_mount_err;
932+
ctx->backupuid = uid;
933+
ctx->backupuid_specified = true;
934+
break;
928935
case Opt_backupgid:
929936
gid = make_kgid(current_user_ns(), result.uint_32);
930937
if (!gid_valid(gid))

fs/cifs/smb2ops.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3617,7 +3617,8 @@ static int smb3_simple_fallocate_write_range(unsigned int xid,
36173617
char *buf)
36183618
{
36193619
struct cifs_io_parms io_parms = {0};
3620-
int rc, nbytes;
3620+
int nbytes;
3621+
int rc = 0;
36213622
struct kvec iov[2];
36223623

36233624
io_parms.netfid = cfile->fid.netfid;

0 commit comments

Comments
 (0)