Commit dd854e4b authored by Kari Argillander's avatar Kari Argillander Committed by 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: default avatarKari Argillander <kari.argillander@gmail.com>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment