Hi,
generic_file_write_nolock() and __generic_file_write_nolock() seems
to be doing exactly same thing. Why do we have 2 of these ?
Can we kill __generic_file_write_nolock() ?
Here is the patch.
Thanks,
Badari
Signed-off-by: Badari Pulavarty <[email protected]>
--- linux.org/mm/filemap.c 2006-01-16 23:44:47.000000000 -0800
+++ linux/mm/filemap.c 2006-01-30 08:51:04.000000000 -0800
@@ -2155,20 +2155,6 @@ generic_file_aio_write_nolock(struct kio
return ret;
}
-static ssize_t
-__generic_file_write_nolock(struct file *file, const struct iovec *iov,
- unsigned long nr_segs, loff_t *ppos)
-{
- struct kiocb kiocb;
- ssize_t ret;
-
- init_sync_kiocb(&kiocb, file);
- ret = __generic_file_aio_write_nolock(&kiocb, iov, nr_segs, ppos);
- if (ret == -EIOCBQUEUED)
- ret = wait_on_sync_kiocb(&kiocb);
- return ret;
-}
-
ssize_t
generic_file_write_nolock(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos)
@@ -2222,7 +2208,7 @@ ssize_t generic_file_write(struct file *
.iov_len = count };
mutex_lock(&inode->i_mutex);
- ret = __generic_file_write_nolock(file, &local_iov, 1, ppos);
+ ret = generic_file_write_nolock(file, &local_iov, 1, ppos);
mutex_unlock(&inode->i_mutex);
if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
@@ -2258,7 +2244,7 @@ ssize_t generic_file_writev(struct file
ssize_t ret;
mutex_lock(&inode->i_mutex);
- ret = __generic_file_write_nolock(file, iov, nr_segs, ppos);
+ ret = generic_file_write_nolock(file, iov, nr_segs, ppos);
mutex_unlock(&inode->i_mutex);
if (ret > 0 && ((file->f_flags & O_SYNC) || IS_SYNC(inode))) {
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]