Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92859
b: refs/heads/master
c: 5746006
h: refs/heads/master
i:
  92857: 0c6b08b
  92855: 6f7e0a5
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Feb 26, 2008
1 parent e632830 commit 234969f
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 32bfb5c0f495dd88ef6bac4b76885d0820563739
refs/heads/master: 5746006f1d17d9d5a3015051ea54de4341cb31f9
37 changes: 37 additions & 0 deletions trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1219,13 +1219,47 @@ static void nfs_destroy_inodecache(void)
kmem_cache_destroy(nfs_inode_cachep);
}

struct workqueue_struct *nfsiod_workqueue;

/*
* start up the nfsiod workqueue
*/
static int nfsiod_start(void)
{
struct workqueue_struct *wq;
dprintk("RPC: creating workqueue nfsiod\n");
wq = create_singlethread_workqueue("nfsiod");
if (wq == NULL)
return -ENOMEM;
nfsiod_workqueue = wq;
return 0;
}

/*
* Destroy the nfsiod workqueue
*/
static void nfsiod_stop(void)
{
struct workqueue_struct *wq;

wq = nfsiod_workqueue;
if (wq == NULL)
return;
nfsiod_workqueue = NULL;
destroy_workqueue(wq);
}

/*
* Initialize NFS
*/
static int __init init_nfs_fs(void)
{
int err;

err = nfsiod_start();
if (err)
goto out6;

err = nfs_fs_proc_init();
if (err)
goto out5;
Expand Down Expand Up @@ -1272,6 +1306,8 @@ static int __init init_nfs_fs(void)
out4:
nfs_fs_proc_exit();
out5:
nfsiod_stop();
out6:
return err;
}

Expand All @@ -1287,6 +1323,7 @@ static void __exit exit_nfs_fs(void)
#endif
unregister_nfs_fs();
nfs_fs_proc_exit();
nfsiod_stop();
}

/* Not quite true; I just maintain it */
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/nfs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ extern struct rpc_procinfo nfs4_procedures[];
extern int nfs_access_cache_shrinker(int nr_to_scan, gfp_t gfp_mask);

/* inode.c */
extern struct workqueue_struct *nfsiod_workqueue;
extern struct inode *nfs_alloc_inode(struct super_block *sb);
extern void nfs_destroy_inode(struct inode *);
extern int nfs_write_inode(struct inode *,int);
Expand Down

0 comments on commit 234969f

Please sign in to comment.