Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -22
+4 -22
fs/nfs/inode.c
··· 62 62 static struct inode *nfs_alloc_inode(struct super_block *sb); 63 63 static void nfs_destroy_inode(struct inode *); 64 64 static int nfs_write_inode(struct inode *,int); 65 - static void nfs_delete_inode(struct inode *); 66 65 static void nfs_clear_inode(struct inode *); 67 66 static void nfs_umount_begin(struct super_block *); 68 67 static int nfs_statfs(struct super_block *, struct kstatfs *); ··· 75 76 .alloc_inode = nfs_alloc_inode, 76 77 .destroy_inode = nfs_destroy_inode, 77 78 .write_inode = nfs_write_inode, 78 - .delete_inode = nfs_delete_inode, 79 79 .statfs = nfs_statfs, 80 80 .clear_inode = nfs_clear_inode, 81 81 .umount_begin = nfs_umount_begin, ··· 145 147 } 146 148 147 149 static void 148 - nfs_delete_inode(struct inode * inode) 149 - { 150 - dprintk("NFS: delete_inode(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); 151 - 152 - truncate_inode_pages(&inode->i_data, 0); 153 - 154 - nfs_wb_all(inode); 155 - /* 156 - * The following should never happen... 157 - */ 158 - if (nfs_have_writebacks(inode)) { 159 - printk(KERN_ERR "nfs_delete_inode: inode %ld has pending RPC requests\n", inode->i_ino); 160 - } 161 - 162 - clear_inode(inode); 163 - } 164 - 165 - static void 166 150 nfs_clear_inode(struct inode *inode) 167 151 { 168 152 struct nfs_inode *nfsi = NFS_I(inode); 169 153 struct rpc_cred *cred; 170 154 171 - nfs_wb_all(inode); 155 + /* 156 + * The following should never happen... 157 + */ 158 + BUG_ON(nfs_have_writebacks(inode)); 172 159 BUG_ON (!list_empty(&nfsi->open_files)); 173 160 nfs_zap_acl_cache(inode); 174 161 cred = nfsi->cache_access.cred; ··· 1804 1821 .alloc_inode = nfs_alloc_inode, 1805 1822 .destroy_inode = nfs_destroy_inode, 1806 1823 .write_inode = nfs_write_inode, 1807 - .delete_inode = nfs_delete_inode, 1808 1824 .statfs = nfs_statfs, 1809 1825 .clear_inode = nfs4_clear_inode, 1810 1826 .umount_begin = nfs_umount_begin,