diff options
-rw-r--r-- | fs/nfs/inode.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 3200358195be..9ff039f9a836 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 *); | |||
62 | static struct inode *nfs_alloc_inode(struct super_block *sb); | 62 | static struct inode *nfs_alloc_inode(struct super_block *sb); |
63 | static void nfs_destroy_inode(struct inode *); | 63 | static void nfs_destroy_inode(struct inode *); |
64 | static int nfs_write_inode(struct inode *,int); | 64 | static int nfs_write_inode(struct inode *,int); |
65 | static void nfs_delete_inode(struct inode *); | ||
66 | static void nfs_clear_inode(struct inode *); | 65 | static void nfs_clear_inode(struct inode *); |
67 | static void nfs_umount_begin(struct super_block *); | 66 | static void nfs_umount_begin(struct super_block *); |
68 | static int nfs_statfs(struct super_block *, struct kstatfs *); | 67 | static int nfs_statfs(struct super_block *, struct kstatfs *); |
@@ -76,7 +75,6 @@ static struct super_operations nfs_sops = { | |||
76 | .alloc_inode = nfs_alloc_inode, | 75 | .alloc_inode = nfs_alloc_inode, |
77 | .destroy_inode = nfs_destroy_inode, | 76 | .destroy_inode = nfs_destroy_inode, |
78 | .write_inode = nfs_write_inode, | 77 | .write_inode = nfs_write_inode, |
79 | .delete_inode = nfs_delete_inode, | ||
80 | .statfs = nfs_statfs, | 78 | .statfs = nfs_statfs, |
81 | .clear_inode = nfs_clear_inode, | 79 | .clear_inode = nfs_clear_inode, |
82 | .umount_begin = nfs_umount_begin, | 80 | .umount_begin = nfs_umount_begin, |
@@ -147,30 +145,15 @@ nfs_write_inode(struct inode *inode, int sync) | |||
147 | } | 145 | } |
148 | 146 | ||
149 | static void | 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 | nfs_clear_inode(struct inode *inode) | 148 | nfs_clear_inode(struct inode *inode) |
169 | { | 149 | { |
170 | struct nfs_inode *nfsi = NFS_I(inode); | 150 | struct nfs_inode *nfsi = NFS_I(inode); |
171 | struct rpc_cred *cred; | 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 | BUG_ON (!list_empty(&nfsi->open_files)); | 157 | BUG_ON (!list_empty(&nfsi->open_files)); |
175 | nfs_zap_acl_cache(inode); | 158 | nfs_zap_acl_cache(inode); |
176 | cred = nfsi->cache_access.cred; | 159 | cred = nfsi->cache_access.cred; |
@@ -1821,7 +1804,6 @@ static struct super_operations nfs4_sops = { | |||
1821 | .alloc_inode = nfs_alloc_inode, | 1804 | .alloc_inode = nfs_alloc_inode, |
1822 | .destroy_inode = nfs_destroy_inode, | 1805 | .destroy_inode = nfs_destroy_inode, |
1823 | .write_inode = nfs_write_inode, | 1806 | .write_inode = nfs_write_inode, |
1824 | .delete_inode = nfs_delete_inode, | ||
1825 | .statfs = nfs_statfs, | 1807 | .statfs = nfs_statfs, |
1826 | .clear_inode = nfs4_clear_inode, | 1808 | .clear_inode = nfs4_clear_inode, |
1827 | .umount_begin = nfs_umount_begin, | 1809 | .umount_begin = nfs_umount_begin, |