aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2010-06-07 14:34:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:48:37 -0400
commitb57922d97fd6f79b6dbe6db0c4fd30d219fa08c1 (patch)
tree1d39e9cd8e1c1f502fb7e985a08286859c69aa36 /fs/nfs/inode.c
parent45321ac54316eaeeebde0b5f728a1791e500974c (diff)
convert remaining ->clear_inode() to ->evict_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 099b3518feea..c211b8168e5b 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -98,7 +98,7 @@ u64 nfs_compat_user_ino64(u64 fileid)
98 return ino; 98 return ino;
99} 99}
100 100
101void nfs_clear_inode(struct inode *inode) 101static void nfs_clear_inode(struct inode *inode)
102{ 102{
103 /* 103 /*
104 * The following should never happen... 104 * The following should never happen...
@@ -110,6 +110,13 @@ void nfs_clear_inode(struct inode *inode)
110 nfs_fscache_release_inode_cookie(inode); 110 nfs_fscache_release_inode_cookie(inode);
111} 111}
112 112
113void nfs_evict_inode(struct inode *inode)
114{
115 truncate_inode_pages(&inode->i_data, 0);
116 end_writeback(inode);
117 nfs_clear_inode(inode);
118}
119
113/** 120/**
114 * nfs_sync_mapping - helper to flush all mmapped dirty data to disk 121 * nfs_sync_mapping - helper to flush all mmapped dirty data to disk
115 */ 122 */
@@ -1338,8 +1345,10 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1338 * to open() calls that passed nfs_atomic_lookup, but failed to call 1345 * to open() calls that passed nfs_atomic_lookup, but failed to call
1339 * nfs_open(). 1346 * nfs_open().
1340 */ 1347 */
1341void nfs4_clear_inode(struct inode *inode) 1348void nfs4_evict_inode(struct inode *inode)
1342{ 1349{
1350 truncate_inode_pages(&inode->i_data, 0);
1351 end_writeback(inode);
1343 /* If we are holding a delegation, return it! */ 1352 /* If we are holding a delegation, return it! */
1344 nfs_inode_return_delegation_noreclaim(inode); 1353 nfs_inode_return_delegation_noreclaim(inode);
1345 /* First call standard NFS clear_inode() code */ 1354 /* First call standard NFS clear_inode() code */