Commit da6d503aa0a75ec44f17d985a2b500077e7f6a74
1 parent
d2ccddf042
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 4 additions and 22 deletions Side-by-side Diff
fs/nfs/inode.c
| ... | ... | @@ -62,7 +62,6 @@ |
| 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 *); |
| ... | ... | @@ -76,7 +75,6 @@ |
| 76 | 75 | .alloc_inode = nfs_alloc_inode, |
| 77 | 76 | .destroy_inode = nfs_destroy_inode, |
| 78 | 77 | .write_inode = nfs_write_inode, |
| 79 | - .delete_inode = nfs_delete_inode, | |
| 80 | 78 | .statfs = nfs_statfs, |
| 81 | 79 | .clear_inode = nfs_clear_inode, |
| 82 | 80 | .umount_begin = nfs_umount_begin, |
| 83 | 81 | |
| ... | ... | @@ -147,30 +145,15 @@ |
| 147 | 145 | } |
| 148 | 146 | |
| 149 | 147 | static void |
| 150 | -nfs_delete_inode(struct inode * inode) | |
| 151 | -{ | |
| 152 | - dprintk("NFS: delete_inode(%s/%ld)\n", inode->i_sb->s_id, inode->i_ino); | |
| 153 | - | |
| 154 | - truncate_inode_pages(&inode->i_data, 0); | |
| 155 | - | |
| 156 | - nfs_wb_all(inode); | |
| 157 | - /* | |
| 158 | - * The following should never happen... | |
| 159 | - */ | |
| 160 | - if (nfs_have_writebacks(inode)) { | |
| 161 | - printk(KERN_ERR "nfs_delete_inode: inode %ld has pending RPC requests\n", inode->i_ino); | |
| 162 | - } | |
| 163 | - | |
| 164 | - clear_inode(inode); | |
| 165 | -} | |
| 166 | - | |
| 167 | -static void | |
| 168 | 148 | nfs_clear_inode(struct inode *inode) |
| 169 | 149 | { |
| 170 | 150 | struct nfs_inode *nfsi = NFS_I(inode); |
| 171 | 151 | struct rpc_cred *cred; |
| 172 | 152 | |
| 173 | - nfs_wb_all(inode); | |
| 153 | + /* | |
| 154 | + * The following should never happen... | |
| 155 | + */ | |
| 156 | + BUG_ON(nfs_have_writebacks(inode)); | |
| 174 | 157 | BUG_ON (!list_empty(&nfsi->open_files)); |
| 175 | 158 | nfs_zap_acl_cache(inode); |
| 176 | 159 | cred = nfsi->cache_access.cred; |
| ... | ... | @@ -1821,7 +1804,6 @@ |
| 1821 | 1804 | .alloc_inode = nfs_alloc_inode, |
| 1822 | 1805 | .destroy_inode = nfs_destroy_inode, |
| 1823 | 1806 | .write_inode = nfs_write_inode, |
| 1824 | - .delete_inode = nfs_delete_inode, | |
| 1825 | 1807 | .statfs = nfs_statfs, |
| 1826 | 1808 | .clear_inode = nfs4_clear_inode, |
| 1827 | 1809 | .umount_begin = nfs_umount_begin, |