fs/*.c: switch to ->close()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index 922ad46..386cae9 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -82,11 +82,6 @@
 	return -EIO;
 }
 
-static int bad_file_release(struct inode *inode, struct file *filp)
-{
-	return -EIO;
-}
-
 static int bad_file_fsync(struct file *file, loff_t start, loff_t end,
 			  int datasync)
 {
@@ -159,7 +154,6 @@
 	.mmap		= bad_file_mmap,
 	.open		= bad_file_open,
 	.flush		= bad_file_flush,
-	.release	= bad_file_release,
 	.fsync		= bad_file_fsync,
 	.aio_fsync	= bad_file_aio_fsync,
 	.fasync		= bad_file_fasync,
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 3823d3f..87c7cc6 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1490,11 +1490,10 @@
 }
 EXPORT_SYMBOL(blkdev_put);
 
-static int blkdev_close(struct inode * inode, struct file * filp)
+static void blkdev_close(struct file * filp)
 {
 	struct block_device *bdev = I_BDEV(filp->f_mapping->host);
 	blkdev_put(bdev, filp->f_mode);
-	return 0;
 }
 
 static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
@@ -1586,7 +1585,7 @@
 
 const struct file_operations def_blk_fops = {
 	.open		= blkdev_open,
-	.release	= blkdev_close,
+	.close		= blkdev_close,
 	.llseek		= block_llseek,
 	.read		= do_sync_read,
 	.write		= do_sync_write,
diff --git a/fs/eventfd.c b/fs/eventfd.c
index 35470d9..570aacd 100644
--- a/fs/eventfd.c
+++ b/fs/eventfd.c
@@ -105,13 +105,12 @@
 }
 EXPORT_SYMBOL_GPL(eventfd_ctx_put);
 
-static int eventfd_release(struct inode *inode, struct file *file)
+static void eventfd_close(struct file *file)
 {
 	struct eventfd_ctx *ctx = file->private_data;
 
 	wake_up_poll(&ctx->wqh, POLLHUP);
 	eventfd_ctx_put(ctx);
-	return 0;
 }
 
 static unsigned int eventfd_poll(struct file *file, poll_table *wait)
@@ -305,7 +304,7 @@
 #ifdef CONFIG_PROC_FS
 	.show_fdinfo	= eventfd_show_fdinfo,
 #endif
-	.release	= eventfd_release,
+	.close		= eventfd_close,
 	.poll		= eventfd_poll,
 	.read		= eventfd_read,
 	.write		= eventfd_write,
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index deecc72..8f05e15 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -763,14 +763,11 @@
 	kfree(ep);
 }
 
-static int ep_eventpoll_release(struct inode *inode, struct file *file)
+static void ep_eventpoll_close(struct file *file)
 {
 	struct eventpoll *ep = file->private_data;
-
 	if (ep)
 		ep_free(ep);
-
-	return 0;
 }
 
 static inline unsigned int ep_item_poll(struct epitem *epi, poll_table *pt)
@@ -858,7 +855,7 @@
 #ifdef CONFIG_PROC_FS
 	.show_fdinfo	= ep_show_fdinfo,
 #endif
-	.release	= ep_eventpoll_release,
+	.close		= ep_eventpoll_close,
 	.poll		= ep_eventpoll_poll,
 	.llseek		= noop_llseek,
 };
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index d0be29f..9203220 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -373,7 +373,7 @@
 #endif
 }
 
-static int fanotify_release(struct inode *ignored, struct file *file)
+static void fanotify_release(struct file *file)
 {
 	struct fsnotify_group *group = file->private_data;
 
@@ -398,13 +398,8 @@
 	wake_up(&group->fanotify_data.access_waitq);
 #endif
 
-	if (file->f_flags & FASYNC)
-		fsnotify_fasync(-1, file, 0);
-
 	/* matches the fanotify_init->fsnotify_alloc_group */
 	fsnotify_destroy_group(group);
-
-	return 0;
 }
 
 static long fanotify_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
@@ -438,7 +433,7 @@
 	.read		= fanotify_read,
 	.write		= fanotify_write,
 	.fasync		= NULL,
-	.release	= fanotify_release,
+	.close		= fanotify_release,
 	.unlocked_ioctl	= fanotify_ioctl,
 	.compat_ioctl	= fanotify_ioctl,
 	.llseek		= noop_llseek,
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 959815c..a67c564 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -281,7 +281,7 @@
 	return ret;
 }
 
-static int inotify_release(struct inode *ignored, struct file *file)
+static void inotify_release(struct file *file)
 {
 	struct fsnotify_group *group = file->private_data;
 
@@ -289,8 +289,6 @@
 
 	/* free this group, matching get was inotify_init->fsnotify_obtain_group */
 	fsnotify_destroy_group(group);
-
-	return 0;
 }
 
 static long inotify_ioctl(struct file *file, unsigned int cmd,
@@ -331,7 +329,7 @@
 	.poll		= inotify_poll,
 	.read		= inotify_read,
 	.fasync		= fsnotify_fasync,
-	.release	= inotify_release,
+	.close		= inotify_release,
 	.unlocked_ioctl	= inotify_ioctl,
 	.compat_ioctl	= inotify_ioctl,
 	.llseek		= noop_llseek,
diff --git a/fs/pipe.c b/fs/pipe.c
index a029a14..8a3e2c4 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -725,9 +725,9 @@
 	return mask;
 }
 
-static int
-pipe_release(struct inode *inode, struct file *file)
+static void pipe_close(struct file *file)
 {
+	struct inode *inode = file_inode(file);
 	struct pipe_inode_info *pipe = inode->i_pipe;
 	int kill = 0;
 
@@ -752,8 +752,6 @@
 
 	if (kill)
 		free_pipe_info(pipe);
-
-	return 0;
 }
 
 static int
@@ -1150,7 +1148,7 @@
 	.aio_write	= pipe_write,
 	.poll		= pipe_poll,
 	.unlocked_ioctl	= pipe_ioctl,
-	.release	= pipe_release,
+	.close		= pipe_close,
 	.fasync		= pipe_fasync,
 };
 
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c
index 62387f5..1b45ef3 100644
--- a/fs/proc_namespace.c
+++ b/fs/proc_namespace.c
@@ -285,13 +285,12 @@
 	return ret;
 }
 
-static int mounts_release(struct inode *inode, struct file *file)
+static void mounts_close(struct file *file)
 {
 	struct proc_mounts *p = proc_mounts(file->private_data);
 	path_put(&p->root);
 	put_mnt_ns(p->ns);
 	seq_close(file);
-	return 0;
 }
 
 static int mounts_open(struct inode *inode, struct file *file)
@@ -313,7 +312,7 @@
 	.open		= mounts_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
-	.release	= mounts_release,
+	.close		= mounts_close,
 	.poll		= mounts_poll,
 };
 
@@ -321,7 +320,7 @@
 	.open		= mountinfo_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
-	.release	= mounts_release,
+	.close		= mounts_close,
 	.poll		= mounts_poll,
 };
 
@@ -329,5 +328,5 @@
 	.open		= mountstats_open,
 	.read		= seq_read,
 	.llseek		= seq_lseek,
-	.release	= mounts_release,
+	.close		= mounts_close,
 };
diff --git a/fs/signalfd.c b/fs/signalfd.c
index 424b7b6..a413bbc 100644
--- a/fs/signalfd.c
+++ b/fs/signalfd.c
@@ -51,12 +51,6 @@
 	sigset_t sigmask;
 };
 
-static int signalfd_release(struct inode *inode, struct file *file)
-{
-	kfree(file->private_data);
-	return 0;
-}
-
 static unsigned int signalfd_poll(struct file *file, poll_table *wait)
 {
 	struct signalfd_ctx *ctx = file->private_data;
@@ -247,7 +241,7 @@
 #ifdef CONFIG_PROC_FS
 	.show_fdinfo	= signalfd_show_fdinfo,
 #endif
-	.release	= signalfd_release,
+	.close		= simple_close_kfree,
 	.poll		= signalfd_poll,
 	.read		= signalfd_read,
 	.llseek		= noop_llseek,
diff --git a/fs/timerfd.c b/fs/timerfd.c
index 32b644f..df67a88 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -153,14 +153,13 @@
 	return 0;
 }
 
-static int timerfd_release(struct inode *inode, struct file *file)
+static void timerfd_close(struct file *file)
 {
 	struct timerfd_ctx *ctx = file->private_data;
 
 	timerfd_remove_cancel(ctx);
 	hrtimer_cancel(&ctx->tmr);
 	kfree_rcu(ctx, rcu);
-	return 0;
 }
 
 static unsigned int timerfd_poll(struct file *file, poll_table *wait)
@@ -229,7 +228,7 @@
 }
 
 static const struct file_operations timerfd_fops = {
-	.release	= timerfd_release,
+	.close		= timerfd_close,
 	.poll		= timerfd_poll,
 	.read		= timerfd_read,
 	.llseek		= noop_llseek,