linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
Subject: [PATCH 47/58] convert exofs to ->evict_inode()
Date: Tue, 08 Jun 2010 23:22:43 +0100	[thread overview]
Message-ID: <E1OM7Bz-0004ez-EC@ZenIV.linux.org.uk> (raw)


Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/exofs/exofs.h |    2 +-
 fs/exofs/inode.c |    8 ++++----
 fs/exofs/super.c |    2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index 22721b2..1a566bf 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -264,7 +264,7 @@ int exofs_write_begin(struct file *file, struct address_space *mapping,
 extern struct inode *exofs_iget(struct super_block *, unsigned long);
 struct inode *exofs_new_inode(struct inode *, int);
 extern int exofs_write_inode(struct inode *, struct writeback_control *wbc);
-extern void exofs_delete_inode(struct inode *);
+extern void exofs_evict_inode(struct inode *);
 
 /* dir.c:                */
 int exofs_add_link(struct dentry *, struct inode *);
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 4bfc1f4..0c9c23d 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -1335,7 +1335,7 @@ static void delete_done(struct exofs_io_state *ios, void *p)
  * from the OSD here.  We make sure the object was created before we try and
  * delete it.
  */
-void exofs_delete_inode(struct inode *inode)
+void exofs_evict_inode(struct inode *inode)
 {
 	struct exofs_i_info *oi = exofs_i(inode);
 	struct super_block *sb = inode->i_sb;
@@ -1345,7 +1345,7 @@ void exofs_delete_inode(struct inode *inode)
 
 	truncate_inode_pages(&inode->i_data, 0);
 
-	if (is_bad_inode(inode))
+	if (inode->i_nlink || is_bad_inode(inode))
 		goto no_delete;
 
 	mark_inode_dirty(inode);
@@ -1355,7 +1355,7 @@ void exofs_delete_inode(struct inode *inode)
 	if (inode->i_blocks)
 		exofs_truncate(inode);
 
-	clear_inode(inode);
+	end_writeback(inode);
 
 	ret = exofs_get_io_state(&sbi->layout, &ios);
 	if (unlikely(ret)) {
@@ -1384,5 +1384,5 @@ void exofs_delete_inode(struct inode *inode)
 	return;
 
 no_delete:
-	clear_inode(inode);
+	end_writeback(inode);
 }
diff --git a/fs/exofs/super.c b/fs/exofs/super.c
index 03149b9..32cfd61 100644
--- a/fs/exofs/super.c
+++ b/fs/exofs/super.c
@@ -743,7 +743,7 @@ static const struct super_operations exofs_sops = {
 	.alloc_inode    = exofs_alloc_inode,
 	.destroy_inode  = exofs_destroy_inode,
 	.write_inode    = exofs_write_inode,
-	.delete_inode   = exofs_delete_inode,
+	.evict_inode    = exofs_evict_inode,
 	.put_super      = exofs_put_super,
 	.write_super    = exofs_write_super,
 	.sync_fs	= exofs_sync_fs,
-- 
1.5.6.5



             reply	other threads:[~2010-06-08 22:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 22:22 Al Viro [this message]
2010-06-09  9:05 ` [PATCH 47/58] convert exofs to ->evict_inode() Boaz Harrosh
2010-06-09 10:02   ` Christoph Hellwig
2010-06-09 11:09     ` Boaz Harrosh
2010-06-09 11:10       ` [PATCH ver4] exofs: New truncate sequence Boaz Harrosh
2010-06-09 11:13         ` Boaz Harrosh
2010-06-09 12:45           ` Al Viro
2010-06-09 13:43             ` Boaz Harrosh
2010-06-09 21:46               ` Al Viro
2010-06-10 12:40                 ` Boaz Harrosh
2010-06-09 13:55         ` Christoph Hellwig
2010-06-09 15:26           ` Boaz Harrosh
2010-06-09 15:23         ` [PATCH ver5] " Boaz Harrosh

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=E1OM7Bz-0004ez-EC@ZenIV.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=linux-fsdevel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).