diff options
author | Latchesar Ionkov <lucho@ionkov.net> | 2007-07-10 18:57:28 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@ericvh-desktop.austin.ibm.com> | 2007-07-14 16:13:40 -0400 |
commit | bd238fb431f31989898423c8b6496bc8c4204a86 (patch) | |
tree | f85a536383cbf360125ecb0592f6c515e0ecf0ff /fs/9p/vfs_dentry.c | |
parent | 8d9107e8c50e1c4ff43c91c8841805833f3ecfb9 (diff) |
9p: Reorganization of 9p file system code
This patchset moves non-filesystem interfaces of v9fs from fs/9p to net/9p.
It moves the transport, packet marshalling and connection layers to net/9p
leaving only the VFS related files in fs/9p. This work is being done in
preparation for in-kernel 9p servers as well as alternate 9p clients (other
than VFS).
Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_dentry.c')
-rw-r--r-- | fs/9p/vfs_dentry.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index d93960429c09..f9534f18df0a 100644 --- a/fs/9p/vfs_dentry.c +++ b/fs/9p/vfs_dentry.c | |||
@@ -34,10 +34,10 @@ | |||
34 | #include <linux/namei.h> | 34 | #include <linux/namei.h> |
35 | #include <linux/idr.h> | 35 | #include <linux/idr.h> |
36 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
37 | #include <net/9p/9p.h> | ||
38 | #include <net/9p/client.h> | ||
37 | 39 | ||
38 | #include "debug.h" | ||
39 | #include "v9fs.h" | 40 | #include "v9fs.h" |
40 | #include "9p.h" | ||
41 | #include "v9fs_vfs.h" | 41 | #include "v9fs_vfs.h" |
42 | #include "fid.h" | 42 | #include "fid.h" |
43 | 43 | ||
@@ -52,7 +52,7 @@ | |||
52 | 52 | ||
53 | static int v9fs_dentry_delete(struct dentry *dentry) | 53 | static int v9fs_dentry_delete(struct dentry *dentry) |
54 | { | 54 | { |
55 | dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); | 55 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); |
56 | 56 | ||
57 | return 1; | 57 | return 1; |
58 | } | 58 | } |
@@ -69,7 +69,7 @@ static int v9fs_dentry_delete(struct dentry *dentry) | |||
69 | static int v9fs_cached_dentry_delete(struct dentry *dentry) | 69 | static int v9fs_cached_dentry_delete(struct dentry *dentry) |
70 | { | 70 | { |
71 | struct inode *inode = dentry->d_inode; | 71 | struct inode *inode = dentry->d_inode; |
72 | dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); | 72 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); |
73 | 73 | ||
74 | if(!inode) | 74 | if(!inode) |
75 | return 1; | 75 | return 1; |
@@ -85,26 +85,19 @@ static int v9fs_cached_dentry_delete(struct dentry *dentry) | |||
85 | 85 | ||
86 | void v9fs_dentry_release(struct dentry *dentry) | 86 | void v9fs_dentry_release(struct dentry *dentry) |
87 | { | 87 | { |
88 | int err; | 88 | struct v9fs_dentry *dent; |
89 | 89 | struct p9_fid *temp, *current_fid; | |
90 | dprintk(DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); | 90 | |
91 | 91 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); | |
92 | if (dentry->d_fsdata != NULL) { | 92 | dent = dentry->d_fsdata; |
93 | struct list_head *fid_list = dentry->d_fsdata; | 93 | if (dent) { |
94 | struct v9fs_fid *temp = NULL; | 94 | list_for_each_entry_safe(current_fid, temp, &dent->fidlist, |
95 | struct v9fs_fid *current_fid = NULL; | 95 | dlist) { |
96 | 96 | p9_client_clunk(current_fid); | |
97 | list_for_each_entry_safe(current_fid, temp, fid_list, list) { | ||
98 | err = v9fs_t_clunk(current_fid->v9ses, current_fid->fid); | ||
99 | |||
100 | if (err < 0) | ||
101 | dprintk(DEBUG_ERROR, "clunk failed: %d name %s\n", | ||
102 | err, dentry->d_iname); | ||
103 | |||
104 | v9fs_fid_destroy(current_fid); | ||
105 | } | 97 | } |
106 | 98 | ||
107 | kfree(dentry->d_fsdata); /* free the list_head */ | 99 | kfree(dent); |
100 | dentry->d_fsdata = NULL; | ||
108 | } | 101 | } |
109 | } | 102 | } |
110 | 103 | ||