Skip to content

Commit 4508896

Browse files
committed
Merge tag 'for-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat
Pull exfat fixes from Namjae Jeon: - Fix potential memory leak in exfat_find - Set exfat's splice_write to iter_file_splice_write to fix a splice failure on direct-opened files * tag 'for-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/linkinjeon/exfat: exfat: fix possible memory leak in exfat_find() exfat: use iter_file_splice_write
2 parents 9d1be4f + 9418216 commit 4508896

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

fs/exfat/file.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,13 @@ int exfat_setattr(struct dentry *dentry, struct iattr *attr)
348348
}
349349

350350
const struct file_operations exfat_file_operations = {
351-
.llseek = generic_file_llseek,
352-
.read_iter = generic_file_read_iter,
353-
.write_iter = generic_file_write_iter,
354-
.mmap = generic_file_mmap,
355-
.fsync = generic_file_fsync,
356-
.splice_read = generic_file_splice_read,
351+
.llseek = generic_file_llseek,
352+
.read_iter = generic_file_read_iter,
353+
.write_iter = generic_file_write_iter,
354+
.mmap = generic_file_mmap,
355+
.fsync = generic_file_fsync,
356+
.splice_read = generic_file_splice_read,
357+
.splice_write = iter_file_splice_write,
357358
};
358359

359360
const struct inode_operations exfat_file_inode_operations = {

fs/exfat/namei.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ static int exfat_find(struct inode *dir, struct qstr *qname,
692692
exfat_fs_error(sb,
693693
"non-zero size file starts with zero cluster (size : %llu, p_dir : %u, entry : 0x%08x)",
694694
i_size_read(dir), ei->dir.dir, ei->entry);
695+
kfree(es);
695696
return -EIO;
696697
}
697698

0 commit comments

Comments
 (0)