未验证 提交 dd854e4b 编写于 作者: K Kari Argillander 提交者: Konstantin Komarov

fs/ntfs3: Remove unnecessary condition checking from ntfs_file_read_iter

This check will be also performed in generic_file_read_iter() so we do
not want to check this two times in a row.

This was founded with Smatch
	fs/ntfs3/file.c:803 ntfs_file_read_iter()
	warn: unused return: count = iov_iter_count()
Signed-off-by: NKari Argillander <kari.argillander@gmail.com>
Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
上级 d4e8e135
......@@ -793,8 +793,6 @@ int ntfs3_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
{
ssize_t err;
size_t count = iov_iter_count(iter);
struct file *file = iocb->ki_filp;
struct inode *inode = file->f_mapping->host;
struct ntfs_inode *ni = ntfs_i(inode);
......@@ -823,9 +821,7 @@ static ssize_t ntfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter)
return -EOPNOTSUPP;
}
err = count ? generic_file_read_iter(iocb, iter) : 0;
return err;
return generic_file_read_iter(iocb, iter);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册