Re: [patch] fs: remove prepare_write/commit_write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 25, 2008 at 01:41:16AM +0200, Nick Piggin wrote:
> --- linux-2.6.orig/mm/filemap.c
> +++ linux-2.6/mm/filemap.c
> @@ -2016,48 +2016,8 @@ int pagecache_write_begin(struct file *f
>  {
>  	const struct address_space_operations *aops = mapping->a_ops;
>  
> +	return aops->write_begin(file, mapping, pos, len, flags,
>  							pagep, fsdata);
>  }
>  EXPORT_SYMBOL(pagecache_write_begin);

Please kill pagecache_write_begin/pagecache_write_end, too.

>  static ssize_t generic_perform_write(struct file *file,
>  				struct iov_iter *i, loff_t pos)
>  {
> @@ -2481,10 +2253,7 @@ generic_file_buffered_write(struct kiocb
>  	struct iov_iter i;
>  
>  	iov_iter_init(&i, iov, nr_segs, count, written);
> -	if (a_ops->write_begin)
> -		status = generic_perform_write(file, &i, pos);
> -	else
> -		status = generic_perform_write_2copy(file, &i, pos);
> +	status = generic_perform_write(file, &i, pos);
>  
>  	if (likely(status >= 0)) {
>  		written += status;

Can we merge generic_perform_write back into
generic_file_buffered_write?  generic_file_buffered_write is left as a
rather useless wrapper after this.

> -	->prepare_write(), ->commit_write(), ->sync_page() and ->readpage()
> +	->write_begin(), ->write_end(), ->sync_page() and ->readpage()
>  may be called from the request handler (/dev/loop).

This comment can go away, all file I/O done by the loop device now is
from a kthread.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux