Skip to contentSkip to conversation

cifs: fix incorrect handling of smb2_set_sparse() return in smb3_simple_falloc

PATCH New Ronnie Sahlberg 1 participant 1 message Mar 14, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: fix incorrect handling of smb2_set_sparse() return in smb3_simple_falloc

smb2_set_sparse does not return -errno, it returns a boolean where true means success.
Change this to just ignore the return value just like the other callsites.

---
 fs/cifs/smb2ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/cifs/smb2ops.c +1 -1
index eee5a27ca95e..581eaa5f34f8 100644
@@ -2781,7 +2781,7 @@ static long smb3_simple_falloc(struct file *file, struct cifs_tcon *tcon,
 			return rc;
 		}
 
-		rc = smb2_set_sparse(xid, tcon, cfile, inode, false);
+		smb2_set_sparse(xid, tcon, cfile, inode, false);
 	}
 	/* BB: else ... in future add code to extend file and set sparse */
 
Signature · 1 line
2.13.6