aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-07-30 16:05:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-30 19:06:46 -0400
commit1c606fb74c758beafd98cbad9a9133eadeec2371 (patch)
treee8c057f32df3ee0a8e0341ae4ef2b23809a83da3 /fs/nfs/write.c
parentddda8e0aa8b955e20cb80908189bfa154ab54837 (diff)
NFS: Convert v3 into a module
This patch exports symbols and moves over the final structures needed by the v3 module. In addition, I also switch over to using IS_ENABLED() to check if CONFIG_NFS_V3 or CONFIG_NFS_V3_MODULE are set. The module (nfs3.ko) will be created in the same directory as nfs.ko and will be automatically loaded the first time you try to mount over NFS v3. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 1e8d4b043769..f268fe4f2785 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -446,7 +446,7 @@ nfs_mark_request_dirty(struct nfs_page *req)
446 __set_page_dirty_nobuffers(req->wb_page); 446 __set_page_dirty_nobuffers(req->wb_page);
447} 447}
448 448
449#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 449#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
450/** 450/**
451 * nfs_request_add_commit_list - add request to a commit list 451 * nfs_request_add_commit_list - add request to a commit list
452 * @req: pointer to a struct nfs_page 452 * @req: pointer to a struct nfs_page
@@ -636,7 +636,7 @@ out:
636 hdr->release(hdr); 636 hdr->release(hdr);
637} 637}
638 638
639#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 639#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
640static unsigned long 640static unsigned long
641nfs_reqs_to_commit(struct nfs_commit_info *cinfo) 641nfs_reqs_to_commit(struct nfs_commit_info *cinfo)
642{ 642{
@@ -1298,7 +1298,7 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
1298 return; 1298 return;
1299 nfs_add_stats(inode, NFSIOS_SERVERWRITTENBYTES, resp->count); 1299 nfs_add_stats(inode, NFSIOS_SERVERWRITTENBYTES, resp->count);
1300 1300
1301#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 1301#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
1302 if (resp->verf->committed < argp->stable && task->tk_status >= 0) { 1302 if (resp->verf->committed < argp->stable && task->tk_status >= 0) {
1303 /* We tried a write call, but the server did not 1303 /* We tried a write call, but the server did not
1304 * commit data to stable storage even though we 1304 * commit data to stable storage even though we
@@ -1358,7 +1358,7 @@ void nfs_writeback_done(struct rpc_task *task, struct nfs_write_data *data)
1358} 1358}
1359 1359
1360 1360
1361#if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) 1361#if IS_ENABLED(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4)
1362static int nfs_commit_set_lock(struct nfs_inode *nfsi, int may_wait) 1362static int nfs_commit_set_lock(struct nfs_inode *nfsi, int may_wait)
1363{ 1363{
1364 int ret; 1364 int ret;