All of lore.kernel.org
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [PATCH 003 of 4] Make address_space_operations->sync_page return void.
Date: Mon, 13 Mar 2006 10:53:26 +1100	[thread overview]
Message-ID: <1060312235326.15972@suse.de> (raw)
In-Reply-To: 20060313104910.15881.patches@notabene


The only user ignores the return value, and the only 
instanace (block_sync_page) always returns 0...


Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./fs/buffer.c                 |    3 +--
 ./fs/cifs/file.c              |    6 ++++--
 ./include/linux/buffer_head.h |    2 +-
 ./include/linux/fs.h          |    2 +-
 4 files changed, 7 insertions(+), 6 deletions(-)

diff ./fs/buffer.c~current~ ./fs/buffer.c
--- ./fs/buffer.c~current~	2006-03-09 17:29:35.000000000 +1100
+++ ./fs/buffer.c	2006-03-13 10:46:35.000000000 +1100
@@ -3024,7 +3024,7 @@ out:
 }
 EXPORT_SYMBOL(try_to_free_buffers);
 
-int block_sync_page(struct page *page)
+void block_sync_page(struct page *page)
 {
 	struct address_space *mapping;
 
@@ -3032,7 +3032,6 @@ int block_sync_page(struct page *page)
 	mapping = page_mapping(page);
 	if (mapping)
 		blk_run_backing_dev(mapping->backing_dev_info, page);
-	return 0;
 }
 
 /*

diff ./fs/cifs/file.c~current~ ./fs/cifs/file.c
--- ./fs/cifs/file.c~current~	2006-03-09 17:29:35.000000000 +1100
+++ ./fs/cifs/file.c	2006-03-13 10:46:35.000000000 +1100
@@ -1377,7 +1377,7 @@ int cifs_fsync(struct file *file, struct
 	return rc;
 }
 
-/* static int cifs_sync_page(struct page *page)
+/* static void cifs_sync_page(struct page *page)
 {
 	struct address_space *mapping;
 	struct inode *inode;
@@ -1391,16 +1391,18 @@ int cifs_fsync(struct file *file, struct
 		return 0;
 	inode = mapping->host;
 	if (!inode)
-		return 0; */
+		return; */
 
 /*	fill in rpages then 
 	result = cifs_pagein_inode(inode, index, rpages); */ /* BB finish */
 
 /*	cFYI(1, ("rpages is %d for sync page of Index %ld ", rpages, index));
 
+#if 0
 	if (rc < 0)
 		return rc;
 	return 0;
+#endif
 } */
 
 /*

diff ./include/linux/buffer_head.h~current~ ./include/linux/buffer_head.h
--- ./include/linux/buffer_head.h~current~	2006-03-09 17:29:35.000000000 +1100
+++ ./include/linux/buffer_head.h	2006-03-13 10:46:35.000000000 +1100
@@ -203,7 +203,7 @@ int cont_prepare_write(struct page*, uns
 int generic_cont_expand(struct inode *inode, loff_t size);
 int generic_cont_expand_simple(struct inode *inode, loff_t size);
 int block_commit_write(struct page *page, unsigned from, unsigned to);
-int block_sync_page(struct page *);
+void block_sync_page(struct page *);
 sector_t generic_block_bmap(struct address_space *, sector_t, get_block_t *);
 int generic_commit_write(struct file *, struct page *, unsigned, unsigned);
 int block_truncate_page(struct address_space *, loff_t, get_block_t *);

diff ./include/linux/fs.h~current~ ./include/linux/fs.h
--- ./include/linux/fs.h~current~	2006-03-09 17:29:35.000000000 +1100
+++ ./include/linux/fs.h	2006-03-13 10:46:35.000000000 +1100
@@ -345,7 +345,7 @@ struct writeback_control;
 struct address_space_operations {
 	int (*writepage)(struct page *page, struct writeback_control *wbc);
 	int (*readpage)(struct file *, struct page *);
-	int (*sync_page)(struct page *);
+	void (*sync_page)(struct page *);
 
 	/* Write back some dirty pages from this mapping. */
 	int (*writepages)(struct address_space *, struct writeback_control *);

  parent reply	other threads:[~2006-03-12 23:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-12 23:53 [PATCH 000 of 4] Introduction: VFS documentation and tidy up NeilBrown
2006-03-12 23:53 ` [PATCH 001 of 4] Update some VFS documentation NeilBrown
2006-03-13  0:22   ` Avishay Traeger
2006-03-13  4:14     ` [PATCH 001 of 4] Update some VFS documentation fix Neil Brown
2006-03-13  4:58   ` [PATCH 001 of 4] Update some VFS documentation Randy.Dunlap
2006-03-12 23:53 ` [PATCH 002 of 4] Honour AOP_TRUNCATE_PAGE returns in page_symlink NeilBrown
2006-03-12 23:53 ` NeilBrown [this message]
2006-03-12 23:53 ` [PATCH 004 of 4] Make address_space_operations->invalidatepage return void NeilBrown
2006-03-13 16:32   ` Dave Kleikamp
2006-03-13 19:13     ` Dave Kleikamp
2006-03-13 21:36       ` Andrew Morton
2006-03-13 23:05         ` Neil Brown
2006-03-13 23:10     ` Neil Brown
2006-03-13 23:22       ` Dave Kleikamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1060312235326.15972@suse.de \
    --to=neilb@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.