From: Christoph Hellwig <hch@lst.de>
To: viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, akpm@osdl.org
Subject: [PATCH] kill ->put_inode
Date: Tue, 29 Apr 2008 17:46:26 +0200 [thread overview]
Message-ID: <20080429154626.GA12645@lst.de> (raw)
In-Reply-To: <20080429150220.GA9398@lst.de>
And with that last patch to affs killing the last put_inode instance we
can finally, after many years of transition kill this racy and awkward
interface.
(It's kinda funny that even the description in
Documentation/filesystems/vfs.txt was entirely wrong..)
Also remove a very misleading comment above the defintion of
struct super_operations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/Documentation/filesystems/Locking
===================================================================
--- linux-2.6.orig/Documentation/filesystems/Locking 2008-04-29 17:29:12.000000000 +0200
+++ linux-2.6/Documentation/filesystems/Locking 2008-04-29 17:29:18.000000000 +0200
@@ -92,7 +92,6 @@ prototypes:
void (*destroy_inode)(struct inode *);
void (*dirty_inode) (struct inode *);
int (*write_inode) (struct inode *, int);
- void (*put_inode) (struct inode *);
void (*drop_inode) (struct inode *);
void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *);
@@ -115,7 +114,6 @@ alloc_inode: no no no
destroy_inode: no
dirty_inode: no (must not sleep)
write_inode: no
-put_inode: no
drop_inode: no !!!inode_lock!!!
delete_inode: no
put_super: yes yes no
Index: linux-2.6/Documentation/filesystems/vfs.txt
===================================================================
--- linux-2.6.orig/Documentation/filesystems/vfs.txt 2008-04-29 17:28:58.000000000 +0200
+++ linux-2.6/Documentation/filesystems/vfs.txt 2008-04-29 17:29:09.000000000 +0200
@@ -205,7 +205,6 @@ struct super_operations {
void (*dirty_inode) (struct inode *);
int (*write_inode) (struct inode *, int);
- void (*put_inode) (struct inode *);
void (*drop_inode) (struct inode *);
void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *);
@@ -246,9 +245,6 @@ or bottom half).
inode to disc. The second parameter indicates whether the write
should be synchronous or not, not all filesystems check this flag.
- put_inode: called when the VFS inode is removed from the inode
- cache.
-
drop_inode: called when the last access to the inode is dropped,
with the inode_lock spinlock held.
Index: linux-2.6/fs/inode.c
===================================================================
--- linux-2.6.orig/fs/inode.c 2008-04-29 17:29:32.000000000 +0200
+++ linux-2.6/fs/inode.c 2008-04-29 17:29:37.000000000 +0200
@@ -1155,9 +1155,6 @@ void iput(struct inode *inode)
BUG_ON(inode->i_state == I_CLEAR);
- if (op && op->put_inode)
- op->put_inode(inode);
-
if (atomic_dec_and_lock(&inode->i_count, &inode_lock))
iput_final(inode);
}
Index: linux-2.6/include/linux/fs.h
===================================================================
--- linux-2.6.orig/include/linux/fs.h 2008-04-29 17:29:41.000000000 +0200
+++ linux-2.6/include/linux/fs.h 2008-04-29 17:29:52.000000000 +0200
@@ -1289,17 +1289,12 @@ extern ssize_t vfs_readv(struct file *,
extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
unsigned long, loff_t *);
-/*
- * NOTE: write_inode, delete_inode, clear_inode, put_inode can be called
- * without the big kernel lock held in all filesystems.
- */
struct super_operations {
struct inode *(*alloc_inode)(struct super_block *sb);
void (*destroy_inode)(struct inode *);
void (*dirty_inode) (struct inode *);
int (*write_inode) (struct inode *, int);
- void (*put_inode) (struct inode *);
void (*drop_inode) (struct inode *);
void (*delete_inode) (struct inode *);
void (*put_super) (struct super_block *);
next prev parent reply other threads:[~2008-04-29 15:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-12 13:45 [PATCH][RFC] fix reservation discarding in affs Christoph Hellwig
2005-02-10 10:39 ` Christoph Hellwig
2005-02-10 12:57 ` Roman Zippel
2008-01-10 15:12 ` Christoph Hellwig
2008-01-14 3:53 ` Roman Zippel
2008-02-07 5:41 ` Christoph Hellwig
2008-02-10 23:47 ` Roman Zippel
2008-04-29 15:02 ` Christoph Hellwig
2008-04-29 15:46 ` Christoph Hellwig [this message]
2008-05-01 10:04 ` Andrew Morton
2008-05-01 16:05 ` Roman Zippel
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=20080429154626.GA12645@lst.de \
--to=hch@lst.de \
--cc=akpm@osdl.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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.