summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-01 17:26:35 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:34:14 -0400
commitda6d503aa0a75ec44f17d985a2b500077e7f6a74 (patch)
tree863dbb7c8a2bdda8b2ef3e462722c867ce6e6c46 /fs/nfs/inode.c
parentd2ccddf042c403b146159beea438c6bfc4a445e2 (diff)
downloadop-kernel-dev-da6d503aa0a75ec44f17d985a2b500077e7f6a74.zip
op-kernel-dev-da6d503aa0a75ec44f17d985a2b500077e7f6a74.tar.gz
NFS: Remove nfs_delete_inode()
Now that we have a real nfs_invalidate_page() to ensure that truncate_inode_pages() does the right thing when there are pending dirty pages, we can get rid of nfs_delete_inode(). Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 3200358..9ff039f 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -62,7 +62,6 @@ static int nfs_update_inode(struct inode *, struct nfs_fattr *);
static struct inode *nfs_alloc_inode(struct super_block *sb);
static void nfs_destroy_inode(struct inode *);
static int nfs_write_inode(struct inode *,int);
-static void nfs_delete_inode(struct inode *);
static void nfs_clear_inode(struct inode *);
static void nfs_umount_begin(struct super_block *);
static int nfs_statfs(struct super_block *, struct kstatfs *);
@@ -76,7 +75,6 @@ static struct super_operations nfs_sops = {
.alloc_inode = nfs_alloc_inode,
.destroy_inode = nfs_destroy_inode,
.write_inode = nfs_write_inode,
- .delete_inode = nfs_delete_inode,
.statfs = nfs_statfs,
.clear_inode = nfs_clear_inode,
.umount_begin = nfs_umount_begin,
@@ -147,30 +145,15 @@ nfs_write_inode(struct inode *inode, int sync)
}
static void
-nfs_delete_inode(struct inode * inode)
-{
- dprintk("NFS: delete_inode(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino);
-
- truncate_inode_pages(&inode->i_data, 0);
-
- nfs_wb_all(inode);
- /*
- * The following should never happen...
- */
- if (nfs_have_writebacks(inode)) {
- printk(KERN_ERR "nfs_delete_inode: inode %ld has pending RPC requests\n", inode->i_ino);
- }
-
- clear_inode(inode);
-}
-
-static void
nfs_clear_inode(struct inode *inode)
{
struct nfs_inode *nfsi = NFS_I(inode);
struct rpc_cred *cred;
- nfs_wb_all(inode);
+ /*
+ * The following should never happen...
+ */
+ BUG_ON(nfs_have_writebacks(inode));
BUG_ON (!list_empty(&nfsi->open_files));
nfs_zap_acl_cache(inode);
cred = nfsi->cache_access.cred;
@@ -1821,7 +1804,6 @@ static struct super_operations nfs4_sops = {
.alloc_inode = nfs_alloc_inode,
.destroy_inode = nfs_destroy_inode,
.write_inode = nfs_write_inode,
- .delete_inode = nfs_delete_inode,
.statfs = nfs_statfs,
.clear_inode = nfs4_clear_inode,
.umount_begin = nfs_umount_begin,
OpenPOWER on IntegriCloud