Commit cbe3802b authored by Konstantin Baev's avatar Konstantin Baev

revert "use cifs_file_aio_read instead of generic_file_aio_read in all sources"

parent 391aadd2
...@@ -621,23 +621,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf, ...@@ -621,23 +621,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -732,7 +715,7 @@ struct file_operations cifs_file_ops = { ...@@ -732,7 +715,7 @@ struct file_operations cifs_file_ops = {
.readv = generic_file_readv, .readv = generic_file_readv,
.writev = cifs_file_writev, .writev = cifs_file_writev,
#endif #endif
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -536,23 +536,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -536,23 +536,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -633,7 +616,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -633,7 +616,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -535,23 +535,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -535,23 +535,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -632,7 +615,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -632,7 +615,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -573,23 +573,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -573,23 +573,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -670,7 +653,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -670,7 +653,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -600,23 +600,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -600,23 +600,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -697,7 +680,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -697,7 +680,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -601,22 +601,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -601,22 +601,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -697,7 +681,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -697,7 +681,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -605,23 +605,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -605,23 +605,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -733,7 +716,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -733,7 +716,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -622,23 +622,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, ...@@ -622,23 +622,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -750,7 +733,7 @@ const struct inode_operations cifs_symlink_inode_ops = { ...@@ -750,7 +733,7 @@ const struct inode_operations cifs_symlink_inode_ops = {
const struct file_operations cifs_file_ops = { const struct file_operations cifs_file_ops = {
.read = do_sync_read, .read = do_sync_read,
.write = do_sync_write, .write = do_sync_write,
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -629,23 +629,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf, ...@@ -629,23 +629,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, char __user *buf,
size_t count, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, buf, count, pos);
else {
read = cifs_user_read(iocb->ki_filp, buf,
count, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -740,7 +723,7 @@ const struct file_operations cifs_file_ops = { ...@@ -740,7 +723,7 @@ const struct file_operations cifs_file_ops = {
.readv = generic_file_readv, .readv = generic_file_readv,
.writev = cifs_file_writev, .writev = cifs_file_writev,
#endif #endif
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -705,22 +705,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf, ...@@ -705,22 +705,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, char __user *buf,
size_t count, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, buf, count, pos);
else {
read = cifs_user_read(iocb->ki_filp, buf,
count, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -828,7 +812,7 @@ struct file_operations cifs_file_ops = { ...@@ -828,7 +812,7 @@ struct file_operations cifs_file_ops = {
.readv = generic_file_readv, .readv = generic_file_readv,
.writev = cifs_file_writev, .writev = cifs_file_writev,
#endif #endif
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
...@@ -629,23 +629,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf, ...@@ -629,23 +629,6 @@ static ssize_t cifs_file_aio_write(struct kiocb *iocb, const char __user *buf,
return written; return written;
} }
static ssize_t cifs_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
ssize_t read;
if (CIFS_I(inode)->clientCanCacheRead)
read = generic_file_aio_read(iocb, iov, nr_segs, pos);
else {
read = cifs_user_read(iocb->ki_filp, iov->iov_base,
iov->iov_len, &pos);
iocb->ki_pos = pos;
}
return read;
}
static loff_t cifs_llseek(struct file *file, loff_t offset, int origin) static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
{ {
/* origin == SEEK_END => we must revalidate the cached file length */ /* origin == SEEK_END => we must revalidate the cached file length */
...@@ -740,7 +723,7 @@ const struct file_operations cifs_file_ops = { ...@@ -740,7 +723,7 @@ const struct file_operations cifs_file_ops = {
.readv = generic_file_readv, .readv = generic_file_readv,
.writev = cifs_file_writev, .writev = cifs_file_writev,
#endif #endif
.aio_read = cifs_file_aio_read, .aio_read = generic_file_aio_read,
.aio_write = cifs_file_aio_write, .aio_write = cifs_file_aio_write,
.open = cifs_open, .open = cifs_open,
.release = cifs_close, .release = cifs_close,
......
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