summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@netapp.com>2015-07-13 14:01:33 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-08-17 13:32:56 -0500
commitaff8d8dc4c34804c6a1de04f1b3313aa9063bf46 (patch)
treee10ddb59fb6507d9e7aef5b87cc2b74c5b6a0cbd /fs/nfs
parentae09c31f66cc673bb8c64a5dbfdc04ab67f66d7e (diff)
downloadlinux-stable-aff8d8dc4c34804c6a1de04f1b3313aa9063bf46.tar.gz
linux-stable-aff8d8dc4c34804c6a1de04f1b3313aa9063bf46.tar.bz2
linux-stable-aff8d8dc4c34804c6a1de04f1b3313aa9063bf46.zip
NFS: Remove nfs_release()
And call nfs_file_clear_open_context() directly. This makes it obvious that nfs_file_release() will always return 0. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/file.c3
-rw-r--r--fs/nfs/inode.c8
2 files changed, 3 insertions, 8 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index cc4fa1ed61fc..7538a8582384 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -82,7 +82,8 @@ nfs_file_release(struct inode *inode, struct file *filp)
dprintk("NFS: release(%pD2)\n", filp);
nfs_inc_stats(inode, NFSIOS_VFSRELEASE);
- return nfs_release(inode, filp);
+ nfs_file_clear_open_context(filp);
+ return 0;
}
EXPORT_SYMBOL_GPL(nfs_file_release);
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 0adc7d245b3d..382c8a46c078 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -888,7 +888,7 @@ struct nfs_open_context *nfs_find_open_context(struct inode *inode, struct rpc_c
return ctx;
}
-static void nfs_file_clear_open_context(struct file *filp)
+void nfs_file_clear_open_context(struct file *filp)
{
struct nfs_open_context *ctx = nfs_file_open_context(filp);
@@ -919,12 +919,6 @@ int nfs_open(struct inode *inode, struct file *filp)
return 0;
}
-int nfs_release(struct inode *inode, struct file *filp)
-{
- nfs_file_clear_open_context(filp);
- return 0;
-}
-
/*
* This function is called whenever some part of NFS notices that
* the cached attributes have to be refreshed.