diff options
Diffstat (limited to 'fs/9p')
-rw-r--r-- | fs/9p/cache.c | 64 | ||||
-rw-r--r-- | fs/9p/fid.c | 8 | ||||
-rw-r--r-- | fs/9p/v9fs.c | 59 | ||||
-rw-r--r-- | fs/9p/vfs_addr.c | 13 | ||||
-rw-r--r-- | fs/9p/vfs_dentry.c | 12 | ||||
-rw-r--r-- | fs/9p/vfs_dir.c | 13 | ||||
-rw-r--r-- | fs/9p/vfs_file.c | 31 | ||||
-rw-r--r-- | fs/9p/vfs_inode.c | 86 | ||||
-rw-r--r-- | fs/9p/vfs_inode_dotl.c | 85 | ||||
-rw-r--r-- | fs/9p/vfs_super.c | 12 | ||||
-rw-r--r-- | fs/9p/xattr.c | 16 |
11 files changed, 197 insertions, 202 deletions
diff --git a/fs/9p/cache.c b/fs/9p/cache.c index 945aa5f02f9b..a9ea73d6dcf3 100644 --- a/fs/9p/cache.c +++ b/fs/9p/cache.c | |||
@@ -62,8 +62,8 @@ static uint16_t v9fs_cache_session_get_key(const void *cookie_netfs_data, | |||
62 | uint16_t klen = 0; | 62 | uint16_t klen = 0; |
63 | 63 | ||
64 | v9ses = (struct v9fs_session_info *)cookie_netfs_data; | 64 | v9ses = (struct v9fs_session_info *)cookie_netfs_data; |
65 | P9_DPRINTK(P9_DEBUG_FSC, "session %p buf %p size %u", v9ses, | 65 | p9_debug(P9_DEBUG_FSC, "session %p buf %p size %u\n", |
66 | buffer, bufmax); | 66 | v9ses, buffer, bufmax); |
67 | 67 | ||
68 | if (v9ses->cachetag) | 68 | if (v9ses->cachetag) |
69 | klen = strlen(v9ses->cachetag); | 69 | klen = strlen(v9ses->cachetag); |
@@ -72,7 +72,7 @@ static uint16_t v9fs_cache_session_get_key(const void *cookie_netfs_data, | |||
72 | return 0; | 72 | return 0; |
73 | 73 | ||
74 | memcpy(buffer, v9ses->cachetag, klen); | 74 | memcpy(buffer, v9ses->cachetag, klen); |
75 | P9_DPRINTK(P9_DEBUG_FSC, "cache session tag %s", v9ses->cachetag); | 75 | p9_debug(P9_DEBUG_FSC, "cache session tag %s\n", v9ses->cachetag); |
76 | return klen; | 76 | return klen; |
77 | } | 77 | } |
78 | 78 | ||
@@ -91,14 +91,14 @@ void v9fs_cache_session_get_cookie(struct v9fs_session_info *v9ses) | |||
91 | v9ses->fscache = fscache_acquire_cookie(v9fs_cache_netfs.primary_index, | 91 | v9ses->fscache = fscache_acquire_cookie(v9fs_cache_netfs.primary_index, |
92 | &v9fs_cache_session_index_def, | 92 | &v9fs_cache_session_index_def, |
93 | v9ses); | 93 | v9ses); |
94 | P9_DPRINTK(P9_DEBUG_FSC, "session %p get cookie %p", v9ses, | 94 | p9_debug(P9_DEBUG_FSC, "session %p get cookie %p\n", |
95 | v9ses->fscache); | 95 | v9ses, v9ses->fscache); |
96 | } | 96 | } |
97 | 97 | ||
98 | void v9fs_cache_session_put_cookie(struct v9fs_session_info *v9ses) | 98 | void v9fs_cache_session_put_cookie(struct v9fs_session_info *v9ses) |
99 | { | 99 | { |
100 | P9_DPRINTK(P9_DEBUG_FSC, "session %p put cookie %p", v9ses, | 100 | p9_debug(P9_DEBUG_FSC, "session %p put cookie %p\n", |
101 | v9ses->fscache); | 101 | v9ses, v9ses->fscache); |
102 | fscache_relinquish_cookie(v9ses->fscache, 0); | 102 | fscache_relinquish_cookie(v9ses->fscache, 0); |
103 | v9ses->fscache = NULL; | 103 | v9ses->fscache = NULL; |
104 | } | 104 | } |
@@ -109,8 +109,8 @@ static uint16_t v9fs_cache_inode_get_key(const void *cookie_netfs_data, | |||
109 | { | 109 | { |
110 | const struct v9fs_inode *v9inode = cookie_netfs_data; | 110 | const struct v9fs_inode *v9inode = cookie_netfs_data; |
111 | memcpy(buffer, &v9inode->qid.path, sizeof(v9inode->qid.path)); | 111 | memcpy(buffer, &v9inode->qid.path, sizeof(v9inode->qid.path)); |
112 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p get key %llu", &v9inode->vfs_inode, | 112 | p9_debug(P9_DEBUG_FSC, "inode %p get key %llu\n", |
113 | v9inode->qid.path); | 113 | &v9inode->vfs_inode, v9inode->qid.path); |
114 | return sizeof(v9inode->qid.path); | 114 | return sizeof(v9inode->qid.path); |
115 | } | 115 | } |
116 | 116 | ||
@@ -120,8 +120,8 @@ static void v9fs_cache_inode_get_attr(const void *cookie_netfs_data, | |||
120 | const struct v9fs_inode *v9inode = cookie_netfs_data; | 120 | const struct v9fs_inode *v9inode = cookie_netfs_data; |
121 | *size = i_size_read(&v9inode->vfs_inode); | 121 | *size = i_size_read(&v9inode->vfs_inode); |
122 | 122 | ||
123 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p get attr %llu", &v9inode->vfs_inode, | 123 | p9_debug(P9_DEBUG_FSC, "inode %p get attr %llu\n", |
124 | *size); | 124 | &v9inode->vfs_inode, *size); |
125 | } | 125 | } |
126 | 126 | ||
127 | static uint16_t v9fs_cache_inode_get_aux(const void *cookie_netfs_data, | 127 | static uint16_t v9fs_cache_inode_get_aux(const void *cookie_netfs_data, |
@@ -129,8 +129,8 @@ static uint16_t v9fs_cache_inode_get_aux(const void *cookie_netfs_data, | |||
129 | { | 129 | { |
130 | const struct v9fs_inode *v9inode = cookie_netfs_data; | 130 | const struct v9fs_inode *v9inode = cookie_netfs_data; |
131 | memcpy(buffer, &v9inode->qid.version, sizeof(v9inode->qid.version)); | 131 | memcpy(buffer, &v9inode->qid.version, sizeof(v9inode->qid.version)); |
132 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p get aux %u", &v9inode->vfs_inode, | 132 | p9_debug(P9_DEBUG_FSC, "inode %p get aux %u\n", |
133 | v9inode->qid.version); | 133 | &v9inode->vfs_inode, v9inode->qid.version); |
134 | return sizeof(v9inode->qid.version); | 134 | return sizeof(v9inode->qid.version); |
135 | } | 135 | } |
136 | 136 | ||
@@ -206,8 +206,8 @@ void v9fs_cache_inode_get_cookie(struct inode *inode) | |||
206 | &v9fs_cache_inode_index_def, | 206 | &v9fs_cache_inode_index_def, |
207 | v9inode); | 207 | v9inode); |
208 | 208 | ||
209 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p get cookie %p", inode, | 209 | p9_debug(P9_DEBUG_FSC, "inode %p get cookie %p\n", |
210 | v9inode->fscache); | 210 | inode, v9inode->fscache); |
211 | } | 211 | } |
212 | 212 | ||
213 | void v9fs_cache_inode_put_cookie(struct inode *inode) | 213 | void v9fs_cache_inode_put_cookie(struct inode *inode) |
@@ -216,8 +216,8 @@ void v9fs_cache_inode_put_cookie(struct inode *inode) | |||
216 | 216 | ||
217 | if (!v9inode->fscache) | 217 | if (!v9inode->fscache) |
218 | return; | 218 | return; |
219 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p put cookie %p", inode, | 219 | p9_debug(P9_DEBUG_FSC, "inode %p put cookie %p\n", |
220 | v9inode->fscache); | 220 | inode, v9inode->fscache); |
221 | 221 | ||
222 | fscache_relinquish_cookie(v9inode->fscache, 0); | 222 | fscache_relinquish_cookie(v9inode->fscache, 0); |
223 | v9inode->fscache = NULL; | 223 | v9inode->fscache = NULL; |
@@ -229,8 +229,8 @@ void v9fs_cache_inode_flush_cookie(struct inode *inode) | |||
229 | 229 | ||
230 | if (!v9inode->fscache) | 230 | if (!v9inode->fscache) |
231 | return; | 231 | return; |
232 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p flush cookie %p", inode, | 232 | p9_debug(P9_DEBUG_FSC, "inode %p flush cookie %p\n", |
233 | v9inode->fscache); | 233 | inode, v9inode->fscache); |
234 | 234 | ||
235 | fscache_relinquish_cookie(v9inode->fscache, 1); | 235 | fscache_relinquish_cookie(v9inode->fscache, 1); |
236 | v9inode->fscache = NULL; | 236 | v9inode->fscache = NULL; |
@@ -272,8 +272,8 @@ void v9fs_cache_inode_reset_cookie(struct inode *inode) | |||
272 | v9inode->fscache = fscache_acquire_cookie(v9ses->fscache, | 272 | v9inode->fscache = fscache_acquire_cookie(v9ses->fscache, |
273 | &v9fs_cache_inode_index_def, | 273 | &v9fs_cache_inode_index_def, |
274 | v9inode); | 274 | v9inode); |
275 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p revalidating cookie old %p new %p", | 275 | p9_debug(P9_DEBUG_FSC, "inode %p revalidating cookie old %p new %p\n", |
276 | inode, old, v9inode->fscache); | 276 | inode, old, v9inode->fscache); |
277 | 277 | ||
278 | spin_unlock(&v9inode->fscache_lock); | 278 | spin_unlock(&v9inode->fscache_lock); |
279 | } | 279 | } |
@@ -323,7 +323,7 @@ int __v9fs_readpage_from_fscache(struct inode *inode, struct page *page) | |||
323 | int ret; | 323 | int ret; |
324 | const struct v9fs_inode *v9inode = V9FS_I(inode); | 324 | const struct v9fs_inode *v9inode = V9FS_I(inode); |
325 | 325 | ||
326 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p page %p", inode, page); | 326 | p9_debug(P9_DEBUG_FSC, "inode %p page %p\n", inode, page); |
327 | if (!v9inode->fscache) | 327 | if (!v9inode->fscache) |
328 | return -ENOBUFS; | 328 | return -ENOBUFS; |
329 | 329 | ||
@@ -335,13 +335,13 @@ int __v9fs_readpage_from_fscache(struct inode *inode, struct page *page) | |||
335 | switch (ret) { | 335 | switch (ret) { |
336 | case -ENOBUFS: | 336 | case -ENOBUFS: |
337 | case -ENODATA: | 337 | case -ENODATA: |
338 | P9_DPRINTK(P9_DEBUG_FSC, "page/inode not in cache %d", ret); | 338 | p9_debug(P9_DEBUG_FSC, "page/inode not in cache %d\n", ret); |
339 | return 1; | 339 | return 1; |
340 | case 0: | 340 | case 0: |
341 | P9_DPRINTK(P9_DEBUG_FSC, "BIO submitted"); | 341 | p9_debug(P9_DEBUG_FSC, "BIO submitted\n"); |
342 | return ret; | 342 | return ret; |
343 | default: | 343 | default: |
344 | P9_DPRINTK(P9_DEBUG_FSC, "ret %d", ret); | 344 | p9_debug(P9_DEBUG_FSC, "ret %d\n", ret); |
345 | return ret; | 345 | return ret; |
346 | } | 346 | } |
347 | } | 347 | } |
@@ -361,7 +361,7 @@ int __v9fs_readpages_from_fscache(struct inode *inode, | |||
361 | int ret; | 361 | int ret; |
362 | const struct v9fs_inode *v9inode = V9FS_I(inode); | 362 | const struct v9fs_inode *v9inode = V9FS_I(inode); |
363 | 363 | ||
364 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p pages %u", inode, *nr_pages); | 364 | p9_debug(P9_DEBUG_FSC, "inode %p pages %u\n", inode, *nr_pages); |
365 | if (!v9inode->fscache) | 365 | if (!v9inode->fscache) |
366 | return -ENOBUFS; | 366 | return -ENOBUFS; |
367 | 367 | ||
@@ -373,15 +373,15 @@ int __v9fs_readpages_from_fscache(struct inode *inode, | |||
373 | switch (ret) { | 373 | switch (ret) { |
374 | case -ENOBUFS: | 374 | case -ENOBUFS: |
375 | case -ENODATA: | 375 | case -ENODATA: |
376 | P9_DPRINTK(P9_DEBUG_FSC, "pages/inodes not in cache %d", ret); | 376 | p9_debug(P9_DEBUG_FSC, "pages/inodes not in cache %d\n", ret); |
377 | return 1; | 377 | return 1; |
378 | case 0: | 378 | case 0: |
379 | BUG_ON(!list_empty(pages)); | 379 | BUG_ON(!list_empty(pages)); |
380 | BUG_ON(*nr_pages != 0); | 380 | BUG_ON(*nr_pages != 0); |
381 | P9_DPRINTK(P9_DEBUG_FSC, "BIO submitted"); | 381 | p9_debug(P9_DEBUG_FSC, "BIO submitted\n"); |
382 | return ret; | 382 | return ret; |
383 | default: | 383 | default: |
384 | P9_DPRINTK(P9_DEBUG_FSC, "ret %d", ret); | 384 | p9_debug(P9_DEBUG_FSC, "ret %d\n", ret); |
385 | return ret; | 385 | return ret; |
386 | } | 386 | } |
387 | } | 387 | } |
@@ -396,9 +396,9 @@ void __v9fs_readpage_to_fscache(struct inode *inode, struct page *page) | |||
396 | int ret; | 396 | int ret; |
397 | const struct v9fs_inode *v9inode = V9FS_I(inode); | 397 | const struct v9fs_inode *v9inode = V9FS_I(inode); |
398 | 398 | ||
399 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p page %p", inode, page); | 399 | p9_debug(P9_DEBUG_FSC, "inode %p page %p\n", inode, page); |
400 | ret = fscache_write_page(v9inode->fscache, page, GFP_KERNEL); | 400 | ret = fscache_write_page(v9inode->fscache, page, GFP_KERNEL); |
401 | P9_DPRINTK(P9_DEBUG_FSC, "ret = %d", ret); | 401 | p9_debug(P9_DEBUG_FSC, "ret = %d\n", ret); |
402 | if (ret != 0) | 402 | if (ret != 0) |
403 | v9fs_uncache_page(inode, page); | 403 | v9fs_uncache_page(inode, page); |
404 | } | 404 | } |
@@ -409,7 +409,7 @@ void __v9fs_readpage_to_fscache(struct inode *inode, struct page *page) | |||
409 | void __v9fs_fscache_wait_on_page_write(struct inode *inode, struct page *page) | 409 | void __v9fs_fscache_wait_on_page_write(struct inode *inode, struct page *page) |
410 | { | 410 | { |
411 | const struct v9fs_inode *v9inode = V9FS_I(inode); | 411 | const struct v9fs_inode *v9inode = V9FS_I(inode); |
412 | P9_DPRINTK(P9_DEBUG_FSC, "inode %p page %p", inode, page); | 412 | p9_debug(P9_DEBUG_FSC, "inode %p page %p\n", inode, page); |
413 | if (PageFsCache(page)) | 413 | if (PageFsCache(page)) |
414 | fscache_wait_on_page_write(v9inode->fscache, page); | 414 | fscache_wait_on_page_write(v9inode->fscache, page); |
415 | } | 415 | } |
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 85b67ffa2a43..da8eefbe830d 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c | |||
@@ -45,8 +45,8 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid) | |||
45 | { | 45 | { |
46 | struct v9fs_dentry *dent; | 46 | struct v9fs_dentry *dent; |
47 | 47 | ||
48 | P9_DPRINTK(P9_DEBUG_VFS, "fid %d dentry %s\n", | 48 | p9_debug(P9_DEBUG_VFS, "fid %d dentry %s\n", |
49 | fid->fid, dentry->d_name.name); | 49 | fid->fid, dentry->d_name.name); |
50 | 50 | ||
51 | dent = dentry->d_fsdata; | 51 | dent = dentry->d_fsdata; |
52 | if (!dent) { | 52 | if (!dent) { |
@@ -79,8 +79,8 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any) | |||
79 | struct v9fs_dentry *dent; | 79 | struct v9fs_dentry *dent; |
80 | struct p9_fid *fid, *ret; | 80 | struct p9_fid *fid, *ret; |
81 | 81 | ||
82 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n", | 82 | p9_debug(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n", |
83 | dentry->d_name.name, dentry, uid, any); | 83 | dentry->d_name.name, dentry, uid, any); |
84 | dent = (struct v9fs_dentry *) dentry->d_fsdata; | 84 | dent = (struct v9fs_dentry *) dentry->d_fsdata; |
85 | ret = NULL; | 85 | ret = NULL; |
86 | if (dent) { | 86 | if (dent) { |
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c index 2b78014a124a..1964f98e74be 100644 --- a/fs/9p/v9fs.c +++ b/fs/9p/v9fs.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
27 | |||
26 | #include <linux/module.h> | 28 | #include <linux/module.h> |
27 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
28 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
@@ -85,15 +87,15 @@ static int get_cache_mode(char *s) | |||
85 | 87 | ||
86 | if (!strcmp(s, "loose")) { | 88 | if (!strcmp(s, "loose")) { |
87 | version = CACHE_LOOSE; | 89 | version = CACHE_LOOSE; |
88 | P9_DPRINTK(P9_DEBUG_9P, "Cache mode: loose\n"); | 90 | p9_debug(P9_DEBUG_9P, "Cache mode: loose\n"); |
89 | } else if (!strcmp(s, "fscache")) { | 91 | } else if (!strcmp(s, "fscache")) { |
90 | version = CACHE_FSCACHE; | 92 | version = CACHE_FSCACHE; |
91 | P9_DPRINTK(P9_DEBUG_9P, "Cache mode: fscache\n"); | 93 | p9_debug(P9_DEBUG_9P, "Cache mode: fscache\n"); |
92 | } else if (!strcmp(s, "none")) { | 94 | } else if (!strcmp(s, "none")) { |
93 | version = CACHE_NONE; | 95 | version = CACHE_NONE; |
94 | P9_DPRINTK(P9_DEBUG_9P, "Cache mode: none\n"); | 96 | p9_debug(P9_DEBUG_9P, "Cache mode: none\n"); |
95 | } else | 97 | } else |
96 | printk(KERN_INFO "9p: Unknown Cache mode %s.\n", s); | 98 | pr_info("Unknown Cache mode %s\n", s); |
97 | return version; | 99 | return version; |
98 | } | 100 | } |
99 | 101 | ||
@@ -140,8 +142,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
140 | case Opt_debug: | 142 | case Opt_debug: |
141 | r = match_int(&args[0], &option); | 143 | r = match_int(&args[0], &option); |
142 | if (r < 0) { | 144 | if (r < 0) { |
143 | P9_DPRINTK(P9_DEBUG_ERROR, | 145 | p9_debug(P9_DEBUG_ERROR, |
144 | "integer field, but no integer?\n"); | 146 | "integer field, but no integer?\n"); |
145 | ret = r; | 147 | ret = r; |
146 | continue; | 148 | continue; |
147 | } | 149 | } |
@@ -154,8 +156,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
154 | case Opt_dfltuid: | 156 | case Opt_dfltuid: |
155 | r = match_int(&args[0], &option); | 157 | r = match_int(&args[0], &option); |
156 | if (r < 0) { | 158 | if (r < 0) { |
157 | P9_DPRINTK(P9_DEBUG_ERROR, | 159 | p9_debug(P9_DEBUG_ERROR, |
158 | "integer field, but no integer?\n"); | 160 | "integer field, but no integer?\n"); |
159 | ret = r; | 161 | ret = r; |
160 | continue; | 162 | continue; |
161 | } | 163 | } |
@@ -164,8 +166,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
164 | case Opt_dfltgid: | 166 | case Opt_dfltgid: |
165 | r = match_int(&args[0], &option); | 167 | r = match_int(&args[0], &option); |
166 | if (r < 0) { | 168 | if (r < 0) { |
167 | P9_DPRINTK(P9_DEBUG_ERROR, | 169 | p9_debug(P9_DEBUG_ERROR, |
168 | "integer field, but no integer?\n"); | 170 | "integer field, but no integer?\n"); |
169 | ret = r; | 171 | ret = r; |
170 | continue; | 172 | continue; |
171 | } | 173 | } |
@@ -174,8 +176,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
174 | case Opt_afid: | 176 | case Opt_afid: |
175 | r = match_int(&args[0], &option); | 177 | r = match_int(&args[0], &option); |
176 | if (r < 0) { | 178 | if (r < 0) { |
177 | P9_DPRINTK(P9_DEBUG_ERROR, | 179 | p9_debug(P9_DEBUG_ERROR, |
178 | "integer field, but no integer?\n"); | 180 | "integer field, but no integer?\n"); |
179 | ret = r; | 181 | ret = r; |
180 | continue; | 182 | continue; |
181 | } | 183 | } |
@@ -205,8 +207,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
205 | s = match_strdup(&args[0]); | 207 | s = match_strdup(&args[0]); |
206 | if (!s) { | 208 | if (!s) { |
207 | ret = -ENOMEM; | 209 | ret = -ENOMEM; |
208 | P9_DPRINTK(P9_DEBUG_ERROR, | 210 | p9_debug(P9_DEBUG_ERROR, |
209 | "problem allocating copy of cache arg\n"); | 211 | "problem allocating copy of cache arg\n"); |
210 | goto free_and_return; | 212 | goto free_and_return; |
211 | } | 213 | } |
212 | ret = get_cache_mode(s); | 214 | ret = get_cache_mode(s); |
@@ -223,8 +225,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
223 | s = match_strdup(&args[0]); | 225 | s = match_strdup(&args[0]); |
224 | if (!s) { | 226 | if (!s) { |
225 | ret = -ENOMEM; | 227 | ret = -ENOMEM; |
226 | P9_DPRINTK(P9_DEBUG_ERROR, | 228 | p9_debug(P9_DEBUG_ERROR, |
227 | "problem allocating copy of access arg\n"); | 229 | "problem allocating copy of access arg\n"); |
228 | goto free_and_return; | 230 | goto free_and_return; |
229 | } | 231 | } |
230 | 232 | ||
@@ -240,8 +242,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
240 | v9ses->uid = simple_strtoul(s, &e, 10); | 242 | v9ses->uid = simple_strtoul(s, &e, 10); |
241 | if (*e != '\0') { | 243 | if (*e != '\0') { |
242 | ret = -EINVAL; | 244 | ret = -EINVAL; |
243 | printk(KERN_INFO "9p: Unknown access " | 245 | pr_info("Unknown access argument %s\n", |
244 | "argument %s.\n", s); | 246 | s); |
245 | kfree(s); | 247 | kfree(s); |
246 | goto free_and_return; | 248 | goto free_and_return; |
247 | } | 249 | } |
@@ -254,9 +256,8 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses, char *opts) | |||
254 | #ifdef CONFIG_9P_FS_POSIX_ACL | 256 | #ifdef CONFIG_9P_FS_POSIX_ACL |
255 | v9ses->flags |= V9FS_POSIX_ACL; | 257 | v9ses->flags |= V9FS_POSIX_ACL; |
256 | #else | 258 | #else |
257 | P9_DPRINTK(P9_DEBUG_ERROR, | 259 | p9_debug(P9_DEBUG_ERROR, |
258 | "Not defined CONFIG_9P_FS_POSIX_ACL. " | 260 | "Not defined CONFIG_9P_FS_POSIX_ACL. Ignoring posixacl option\n"); |
259 | "Ignoring posixacl option\n"); | ||
260 | #endif | 261 | #endif |
261 | break; | 262 | break; |
262 | 263 | ||
@@ -318,7 +319,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, | |||
318 | if (IS_ERR(v9ses->clnt)) { | 319 | if (IS_ERR(v9ses->clnt)) { |
319 | retval = PTR_ERR(v9ses->clnt); | 320 | retval = PTR_ERR(v9ses->clnt); |
320 | v9ses->clnt = NULL; | 321 | v9ses->clnt = NULL; |
321 | P9_DPRINTK(P9_DEBUG_ERROR, "problem initializing 9p client\n"); | 322 | p9_debug(P9_DEBUG_ERROR, "problem initializing 9p client\n"); |
322 | goto error; | 323 | goto error; |
323 | } | 324 | } |
324 | 325 | ||
@@ -371,7 +372,7 @@ struct p9_fid *v9fs_session_init(struct v9fs_session_info *v9ses, | |||
371 | if (IS_ERR(fid)) { | 372 | if (IS_ERR(fid)) { |
372 | retval = PTR_ERR(fid); | 373 | retval = PTR_ERR(fid); |
373 | fid = NULL; | 374 | fid = NULL; |
374 | P9_DPRINTK(P9_DEBUG_ERROR, "cannot attach\n"); | 375 | p9_debug(P9_DEBUG_ERROR, "cannot attach\n"); |
375 | goto error; | 376 | goto error; |
376 | } | 377 | } |
377 | 378 | ||
@@ -429,7 +430,7 @@ void v9fs_session_close(struct v9fs_session_info *v9ses) | |||
429 | */ | 430 | */ |
430 | 431 | ||
431 | void v9fs_session_cancel(struct v9fs_session_info *v9ses) { | 432 | void v9fs_session_cancel(struct v9fs_session_info *v9ses) { |
432 | P9_DPRINTK(P9_DEBUG_ERROR, "cancel session %p\n", v9ses); | 433 | p9_debug(P9_DEBUG_ERROR, "cancel session %p\n", v9ses); |
433 | p9_client_disconnect(v9ses->clnt); | 434 | p9_client_disconnect(v9ses->clnt); |
434 | } | 435 | } |
435 | 436 | ||
@@ -442,7 +443,7 @@ void v9fs_session_cancel(struct v9fs_session_info *v9ses) { | |||
442 | 443 | ||
443 | void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses) | 444 | void v9fs_session_begin_cancel(struct v9fs_session_info *v9ses) |
444 | { | 445 | { |
445 | P9_DPRINTK(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses); | 446 | p9_debug(P9_DEBUG_ERROR, "begin cancel session %p\n", v9ses); |
446 | p9_client_begin_disconnect(v9ses->clnt); | 447 | p9_client_begin_disconnect(v9ses->clnt); |
447 | } | 448 | } |
448 | 449 | ||
@@ -591,23 +592,23 @@ static void v9fs_cache_unregister(void) | |||
591 | static int __init init_v9fs(void) | 592 | static int __init init_v9fs(void) |
592 | { | 593 | { |
593 | int err; | 594 | int err; |
594 | printk(KERN_INFO "Installing v9fs 9p2000 file system support\n"); | 595 | pr_info("Installing v9fs 9p2000 file system support\n"); |
595 | /* TODO: Setup list of registered trasnport modules */ | 596 | /* TODO: Setup list of registered trasnport modules */ |
596 | err = register_filesystem(&v9fs_fs_type); | 597 | err = register_filesystem(&v9fs_fs_type); |
597 | if (err < 0) { | 598 | if (err < 0) { |
598 | printk(KERN_ERR "Failed to register filesystem\n"); | 599 | pr_err("Failed to register filesystem\n"); |
599 | return err; | 600 | return err; |
600 | } | 601 | } |
601 | 602 | ||
602 | err = v9fs_cache_register(); | 603 | err = v9fs_cache_register(); |
603 | if (err < 0) { | 604 | if (err < 0) { |
604 | printk(KERN_ERR "Failed to register v9fs for caching\n"); | 605 | pr_err("Failed to register v9fs for caching\n"); |
605 | goto out_fs_unreg; | 606 | goto out_fs_unreg; |
606 | } | 607 | } |
607 | 608 | ||
608 | err = v9fs_sysfs_init(); | 609 | err = v9fs_sysfs_init(); |
609 | if (err < 0) { | 610 | if (err < 0) { |
610 | printk(KERN_ERR "Failed to register with sysfs\n"); | 611 | pr_err("Failed to register with sysfs\n"); |
611 | goto out_sysfs_cleanup; | 612 | goto out_sysfs_cleanup; |
612 | } | 613 | } |
613 | 614 | ||
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c index 2524e4cbb8ea..0ad61c6a65a5 100644 --- a/fs/9p/vfs_addr.c +++ b/fs/9p/vfs_addr.c | |||
@@ -56,7 +56,7 @@ static int v9fs_fid_readpage(struct p9_fid *fid, struct page *page) | |||
56 | struct inode *inode; | 56 | struct inode *inode; |
57 | 57 | ||
58 | inode = page->mapping->host; | 58 | inode = page->mapping->host; |
59 | P9_DPRINTK(P9_DEBUG_VFS, "\n"); | 59 | p9_debug(P9_DEBUG_VFS, "\n"); |
60 | 60 | ||
61 | BUG_ON(!PageLocked(page)); | 61 | BUG_ON(!PageLocked(page)); |
62 | 62 | ||
@@ -116,14 +116,14 @@ static int v9fs_vfs_readpages(struct file *filp, struct address_space *mapping, | |||
116 | struct inode *inode; | 116 | struct inode *inode; |
117 | 117 | ||
118 | inode = mapping->host; | 118 | inode = mapping->host; |
119 | P9_DPRINTK(P9_DEBUG_VFS, "inode: %p file: %p\n", inode, filp); | 119 | p9_debug(P9_DEBUG_VFS, "inode: %p file: %p\n", inode, filp); |
120 | 120 | ||
121 | ret = v9fs_readpages_from_fscache(inode, mapping, pages, &nr_pages); | 121 | ret = v9fs_readpages_from_fscache(inode, mapping, pages, &nr_pages); |
122 | if (ret == 0) | 122 | if (ret == 0) |
123 | return ret; | 123 | return ret; |
124 | 124 | ||
125 | ret = read_cache_pages(mapping, pages, (void *)v9fs_vfs_readpage, filp); | 125 | ret = read_cache_pages(mapping, pages, (void *)v9fs_vfs_readpage, filp); |
126 | P9_DPRINTK(P9_DEBUG_VFS, " = %d\n", ret); | 126 | p9_debug(P9_DEBUG_VFS, " = %d\n", ret); |
127 | return ret; | 127 | return ret; |
128 | } | 128 | } |
129 | 129 | ||
@@ -263,10 +263,9 @@ v9fs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | |||
263 | * Now that we do caching with cache mode enabled, We need | 263 | * Now that we do caching with cache mode enabled, We need |
264 | * to support direct IO | 264 | * to support direct IO |
265 | */ | 265 | */ |
266 | P9_DPRINTK(P9_DEBUG_VFS, "v9fs_direct_IO: v9fs_direct_IO (%s) " | 266 | p9_debug(P9_DEBUG_VFS, "v9fs_direct_IO: v9fs_direct_IO (%s) off/no(%lld/%lu) EINVAL\n", |
267 | "off/no(%lld/%lu) EINVAL\n", | 267 | iocb->ki_filp->f_path.dentry->d_name.name, |
268 | iocb->ki_filp->f_path.dentry->d_name.name, | 268 | (long long)pos, nr_segs); |
269 | (long long) pos, nr_segs); | ||
270 | 269 | ||
271 | return -EINVAL; | 270 | return -EINVAL; |
272 | } | 271 | } |
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c index e022890c6f40..d529437ff442 100644 --- a/fs/9p/vfs_dentry.c +++ b/fs/9p/vfs_dentry.c | |||
@@ -53,8 +53,8 @@ | |||
53 | 53 | ||
54 | static int v9fs_dentry_delete(const struct dentry *dentry) | 54 | static int v9fs_dentry_delete(const struct dentry *dentry) |
55 | { | 55 | { |
56 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name, | 56 | p9_debug(P9_DEBUG_VFS, " dentry: %s (%p)\n", |
57 | dentry); | 57 | dentry->d_name.name, dentry); |
58 | 58 | ||
59 | return 1; | 59 | return 1; |
60 | } | 60 | } |
@@ -66,8 +66,8 @@ static int v9fs_dentry_delete(const struct dentry *dentry) | |||
66 | */ | 66 | */ |
67 | static int v9fs_cached_dentry_delete(const struct dentry *dentry) | 67 | static int v9fs_cached_dentry_delete(const struct dentry *dentry) |
68 | { | 68 | { |
69 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", | 69 | p9_debug(P9_DEBUG_VFS, " dentry: %s (%p)\n", |
70 | dentry->d_name.name, dentry); | 70 | dentry->d_name.name, dentry); |
71 | 71 | ||
72 | /* Don't cache negative dentries */ | 72 | /* Don't cache negative dentries */ |
73 | if (!dentry->d_inode) | 73 | if (!dentry->d_inode) |
@@ -86,8 +86,8 @@ static void v9fs_dentry_release(struct dentry *dentry) | |||
86 | struct v9fs_dentry *dent; | 86 | struct v9fs_dentry *dent; |
87 | struct p9_fid *temp, *current_fid; | 87 | struct p9_fid *temp, *current_fid; |
88 | 88 | ||
89 | P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name, | 89 | p9_debug(P9_DEBUG_VFS, " dentry: %s (%p)\n", |
90 | dentry); | 90 | dentry->d_name.name, dentry); |
91 | dent = dentry->d_fsdata; | 91 | dent = dentry->d_fsdata; |
92 | if (dent) { | 92 | if (dent) { |
93 | list_for_each_entry_safe(current_fid, temp, &dent->fidlist, | 93 | list_for_each_entry_safe(current_fid, temp, &dent->fidlist, |
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index 598fff1a54e5..ff911e779651 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c | |||
@@ -140,7 +140,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
140 | int reclen = 0; | 140 | int reclen = 0; |
141 | struct p9_rdir *rdir; | 141 | struct p9_rdir *rdir; |
142 | 142 | ||
143 | P9_DPRINTK(P9_DEBUG_VFS, "name %s\n", filp->f_path.dentry->d_name.name); | 143 | p9_debug(P9_DEBUG_VFS, "name %s\n", filp->f_path.dentry->d_name.name); |
144 | fid = filp->private_data; | 144 | fid = filp->private_data; |
145 | 145 | ||
146 | buflen = fid->clnt->msize - P9_IOHDRSZ; | 146 | buflen = fid->clnt->msize - P9_IOHDRSZ; |
@@ -168,7 +168,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
168 | err = p9stat_read(fid->clnt, rdir->buf + rdir->head, | 168 | err = p9stat_read(fid->clnt, rdir->buf + rdir->head, |
169 | rdir->tail - rdir->head, &st); | 169 | rdir->tail - rdir->head, &st); |
170 | if (err) { | 170 | if (err) { |
171 | P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err); | 171 | p9_debug(P9_DEBUG_VFS, "returned %d\n", err); |
172 | err = -EIO; | 172 | err = -EIO; |
173 | p9stat_free(&st); | 173 | p9stat_free(&st); |
174 | goto unlock_and_exit; | 174 | goto unlock_and_exit; |
@@ -213,7 +213,7 @@ static int v9fs_dir_readdir_dotl(struct file *filp, void *dirent, | |||
213 | struct p9_dirent curdirent; | 213 | struct p9_dirent curdirent; |
214 | u64 oldoffset = 0; | 214 | u64 oldoffset = 0; |
215 | 215 | ||
216 | P9_DPRINTK(P9_DEBUG_VFS, "name %s\n", filp->f_path.dentry->d_name.name); | 216 | p9_debug(P9_DEBUG_VFS, "name %s\n", filp->f_path.dentry->d_name.name); |
217 | fid = filp->private_data; | 217 | fid = filp->private_data; |
218 | 218 | ||
219 | buflen = fid->clnt->msize - P9_READDIRHDRSZ; | 219 | buflen = fid->clnt->msize - P9_READDIRHDRSZ; |
@@ -244,7 +244,7 @@ static int v9fs_dir_readdir_dotl(struct file *filp, void *dirent, | |||
244 | rdir->tail - rdir->head, | 244 | rdir->tail - rdir->head, |
245 | &curdirent); | 245 | &curdirent); |
246 | if (err < 0) { | 246 | if (err < 0) { |
247 | P9_DPRINTK(P9_DEBUG_VFS, "returned %d\n", err); | 247 | p9_debug(P9_DEBUG_VFS, "returned %d\n", err); |
248 | err = -EIO; | 248 | err = -EIO; |
249 | goto unlock_and_exit; | 249 | goto unlock_and_exit; |
250 | } | 250 | } |
@@ -290,9 +290,8 @@ int v9fs_dir_release(struct inode *inode, struct file *filp) | |||
290 | struct p9_fid *fid; | 290 | struct p9_fid *fid; |
291 | 291 | ||
292 | fid = filp->private_data; | 292 | fid = filp->private_data; |
293 | P9_DPRINTK(P9_DEBUG_VFS, | 293 | p9_debug(P9_DEBUG_VFS, "inode: %p filp: %p fid: %d\n", |
294 | "v9fs_dir_release: inode: %p filp: %p fid: %d\n", | 294 | inode, filp, fid ? fid->fid : -1); |
295 | inode, filp, fid ? fid->fid : -1); | ||
296 | if (fid) | 295 | if (fid) |
297 | p9_client_clunk(fid); | 296 | p9_client_clunk(fid); |
298 | return 0; | 297 | return 0; |
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index a7ac45d5bd2c..fc06fd27065e 100644 --- a/fs/9p/vfs_file.c +++ b/fs/9p/vfs_file.c | |||
@@ -61,7 +61,7 @@ int v9fs_file_open(struct inode *inode, struct file *file) | |||
61 | struct p9_fid *fid; | 61 | struct p9_fid *fid; |
62 | int omode; | 62 | int omode; |
63 | 63 | ||
64 | P9_DPRINTK(P9_DEBUG_VFS, "inode: %p file: %p\n", inode, file); | 64 | p9_debug(P9_DEBUG_VFS, "inode: %p file: %p\n", inode, file); |
65 | v9inode = V9FS_I(inode); | 65 | v9inode = V9FS_I(inode); |
66 | v9ses = v9fs_inode2v9ses(inode); | 66 | v9ses = v9fs_inode2v9ses(inode); |
67 | if (v9fs_proto_dotl(v9ses)) | 67 | if (v9fs_proto_dotl(v9ses)) |
@@ -135,7 +135,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl) | |||
135 | int res = 0; | 135 | int res = 0; |
136 | struct inode *inode = filp->f_path.dentry->d_inode; | 136 | struct inode *inode = filp->f_path.dentry->d_inode; |
137 | 137 | ||
138 | P9_DPRINTK(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); | 138 | p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl); |
139 | 139 | ||
140 | /* No mandatory locks */ | 140 | /* No mandatory locks */ |
141 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) | 141 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) |
@@ -305,8 +305,8 @@ static int v9fs_file_lock_dotl(struct file *filp, int cmd, struct file_lock *fl) | |||
305 | struct inode *inode = filp->f_path.dentry->d_inode; | 305 | struct inode *inode = filp->f_path.dentry->d_inode; |
306 | int ret = -ENOLCK; | 306 | int ret = -ENOLCK; |
307 | 307 | ||
308 | P9_DPRINTK(P9_DEBUG_VFS, "filp: %p cmd:%d lock: %p name: %s\n", filp, | 308 | p9_debug(P9_DEBUG_VFS, "filp: %p cmd:%d lock: %p name: %s\n", |
309 | cmd, fl, filp->f_path.dentry->d_name.name); | 309 | filp, cmd, fl, filp->f_path.dentry->d_name.name); |
310 | 310 | ||
311 | /* No mandatory locks */ | 311 | /* No mandatory locks */ |
312 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) | 312 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) |
@@ -341,8 +341,8 @@ static int v9fs_file_flock_dotl(struct file *filp, int cmd, | |||
341 | struct inode *inode = filp->f_path.dentry->d_inode; | 341 | struct inode *inode = filp->f_path.dentry->d_inode; |
342 | int ret = -ENOLCK; | 342 | int ret = -ENOLCK; |
343 | 343 | ||
344 | P9_DPRINTK(P9_DEBUG_VFS, "filp: %p cmd:%d lock: %p name: %s\n", filp, | 344 | p9_debug(P9_DEBUG_VFS, "filp: %p cmd:%d lock: %p name: %s\n", |
345 | cmd, fl, filp->f_path.dentry->d_name.name); | 345 | filp, cmd, fl, filp->f_path.dentry->d_name.name); |
346 | 346 | ||
347 | /* No mandatory locks */ | 347 | /* No mandatory locks */ |
348 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) | 348 | if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK) |
@@ -385,8 +385,8 @@ v9fs_fid_readn(struct p9_fid *fid, char *data, char __user *udata, u32 count, | |||
385 | { | 385 | { |
386 | int n, total, size; | 386 | int n, total, size; |
387 | 387 | ||
388 | P9_DPRINTK(P9_DEBUG_VFS, "fid %d offset %llu count %d\n", fid->fid, | 388 | p9_debug(P9_DEBUG_VFS, "fid %d offset %llu count %d\n", |
389 | (long long unsigned) offset, count); | 389 | fid->fid, (long long unsigned)offset, count); |
390 | n = 0; | 390 | n = 0; |
391 | total = 0; | 391 | total = 0; |
392 | size = fid->iounit ? fid->iounit : fid->clnt->msize - P9_IOHDRSZ; | 392 | size = fid->iounit ? fid->iounit : fid->clnt->msize - P9_IOHDRSZ; |
@@ -444,7 +444,7 @@ v9fs_file_read(struct file *filp, char __user *udata, size_t count, | |||
444 | struct p9_fid *fid; | 444 | struct p9_fid *fid; |
445 | size_t size; | 445 | size_t size; |
446 | 446 | ||
447 | P9_DPRINTK(P9_DEBUG_VFS, "count %zu offset %lld\n", count, *offset); | 447 | p9_debug(P9_DEBUG_VFS, "count %zu offset %lld\n", count, *offset); |
448 | fid = filp->private_data; | 448 | fid = filp->private_data; |
449 | 449 | ||
450 | size = fid->iounit ? fid->iounit : fid->clnt->msize - P9_IOHDRSZ; | 450 | size = fid->iounit ? fid->iounit : fid->clnt->msize - P9_IOHDRSZ; |
@@ -471,8 +471,8 @@ v9fs_file_write_internal(struct inode *inode, struct p9_fid *fid, | |||
471 | loff_t origin = *offset; | 471 | loff_t origin = *offset; |
472 | unsigned long pg_start, pg_end; | 472 | unsigned long pg_start, pg_end; |
473 | 473 | ||
474 | P9_DPRINTK(P9_DEBUG_VFS, "data %p count %d offset %x\n", data, | 474 | p9_debug(P9_DEBUG_VFS, "data %p count %d offset %x\n", |
475 | (int)count, (int)*offset); | 475 | data, (int)count, (int)*offset); |
476 | 476 | ||
477 | clnt = fid->clnt; | 477 | clnt = fid->clnt; |
478 | do { | 478 | do { |
@@ -553,7 +553,7 @@ static int v9fs_file_fsync(struct file *filp, loff_t start, loff_t end, | |||
553 | return retval; | 553 | return retval; |
554 | 554 | ||
555 | mutex_lock(&inode->i_mutex); | 555 | mutex_lock(&inode->i_mutex); |
556 | P9_DPRINTK(P9_DEBUG_VFS, "filp %p datasync %x\n", filp, datasync); | 556 | p9_debug(P9_DEBUG_VFS, "filp %p datasync %x\n", filp, datasync); |
557 | 557 | ||
558 | fid = filp->private_data; | 558 | fid = filp->private_data; |
559 | v9fs_blank_wstat(&wstat); | 559 | v9fs_blank_wstat(&wstat); |
@@ -576,8 +576,7 @@ int v9fs_file_fsync_dotl(struct file *filp, loff_t start, loff_t end, | |||
576 | return retval; | 576 | return retval; |
577 | 577 | ||
578 | mutex_lock(&inode->i_mutex); | 578 | mutex_lock(&inode->i_mutex); |
579 | P9_DPRINTK(P9_DEBUG_VFS, "v9fs_file_fsync_dotl: filp %p datasync %x\n", | 579 | p9_debug(P9_DEBUG_VFS, "filp %p datasync %x\n", filp, datasync); |
580 | filp, datasync); | ||
581 | 580 | ||
582 | fid = filp->private_data; | 581 | fid = filp->private_data; |
583 | 582 | ||
@@ -608,8 +607,8 @@ v9fs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
608 | struct inode *inode = filp->f_path.dentry->d_inode; | 607 | struct inode *inode = filp->f_path.dentry->d_inode; |
609 | 608 | ||
610 | 609 | ||
611 | P9_DPRINTK(P9_DEBUG_VFS, "page %p fid %lx\n", | 610 | p9_debug(P9_DEBUG_VFS, "page %p fid %lx\n", |
612 | page, (unsigned long)filp->private_data); | 611 | page, (unsigned long)filp->private_data); |
613 | 612 | ||
614 | v9inode = V9FS_I(inode); | 613 | v9inode = V9FS_I(inode); |
615 | /* make sure the cache has finished storing the page */ | 614 | /* make sure the cache has finished storing the page */ |
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 879ed8851737..85c29733d8b8 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -23,6 +23,8 @@ | |||
23 | * | 23 | * |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
27 | |||
26 | #include <linux/module.h> | 28 | #include <linux/module.h> |
27 | #include <linux/errno.h> | 29 | #include <linux/errno.h> |
28 | #include <linux/fs.h> | 30 | #include <linux/fs.h> |
@@ -133,9 +135,8 @@ static int p9mode2unixmode(struct v9fs_session_info *v9ses, | |||
133 | res |= S_IFBLK; | 135 | res |= S_IFBLK; |
134 | break; | 136 | break; |
135 | default: | 137 | default: |
136 | P9_DPRINTK(P9_DEBUG_ERROR, | 138 | p9_debug(P9_DEBUG_ERROR, "Unknown special type %c %s\n", |
137 | "Unknown special type %c %s\n", type, | 139 | type, stat->extension); |
138 | stat->extension); | ||
139 | }; | 140 | }; |
140 | *rdev = MKDEV(major, minor); | 141 | *rdev = MKDEV(major, minor); |
141 | } else | 142 | } else |
@@ -281,8 +282,8 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses, | |||
281 | } else if (v9fs_proto_dotu(v9ses)) { | 282 | } else if (v9fs_proto_dotu(v9ses)) { |
282 | inode->i_op = &v9fs_file_inode_operations; | 283 | inode->i_op = &v9fs_file_inode_operations; |
283 | } else { | 284 | } else { |
284 | P9_DPRINTK(P9_DEBUG_ERROR, | 285 | p9_debug(P9_DEBUG_ERROR, |
285 | "special files without extended mode\n"); | 286 | "special files without extended mode\n"); |
286 | err = -EINVAL; | 287 | err = -EINVAL; |
287 | goto error; | 288 | goto error; |
288 | } | 289 | } |
@@ -307,8 +308,8 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses, | |||
307 | break; | 308 | break; |
308 | case S_IFLNK: | 309 | case S_IFLNK: |
309 | if (!v9fs_proto_dotu(v9ses) && !v9fs_proto_dotl(v9ses)) { | 310 | if (!v9fs_proto_dotu(v9ses) && !v9fs_proto_dotl(v9ses)) { |
310 | P9_DPRINTK(P9_DEBUG_ERROR, "extended modes used with " | 311 | p9_debug(P9_DEBUG_ERROR, |
311 | "legacy protocol.\n"); | 312 | "extended modes used with legacy protocol\n"); |
312 | err = -EINVAL; | 313 | err = -EINVAL; |
313 | goto error; | 314 | goto error; |
314 | } | 315 | } |
@@ -335,8 +336,8 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses, | |||
335 | 336 | ||
336 | break; | 337 | break; |
337 | default: | 338 | default: |
338 | P9_DPRINTK(P9_DEBUG_ERROR, "BAD mode 0x%x S_IFMT 0x%x\n", | 339 | p9_debug(P9_DEBUG_ERROR, "BAD mode 0x%x S_IFMT 0x%x\n", |
339 | mode, mode & S_IFMT); | 340 | mode, mode & S_IFMT); |
340 | err = -EINVAL; | 341 | err = -EINVAL; |
341 | goto error; | 342 | goto error; |
342 | } | 343 | } |
@@ -358,11 +359,12 @@ struct inode *v9fs_get_inode(struct super_block *sb, int mode, dev_t rdev) | |||
358 | struct inode *inode; | 359 | struct inode *inode; |
359 | struct v9fs_session_info *v9ses = sb->s_fs_info; | 360 | struct v9fs_session_info *v9ses = sb->s_fs_info; |
360 | 361 | ||
361 | P9_DPRINTK(P9_DEBUG_VFS, "super block: %p mode: %o\n", sb, mode); | 362 | p9_debug(P9_DEBUG_VFS, "super block: %p mode: %o\n", sb, mode); |
362 | 363 | ||
363 | inode = new_inode(sb); | 364 | inode = new_inode(sb); |
364 | if (!inode) { | 365 | if (!inode) { |
365 | P9_EPRINTK(KERN_WARNING, "Problem allocating inode\n"); | 366 | pr_warn("%s (%d): Problem allocating inode\n", |
367 | __func__, task_pid_nr(current)); | ||
366 | return ERR_PTR(-ENOMEM); | 368 | return ERR_PTR(-ENOMEM); |
367 | } | 369 | } |
368 | err = v9fs_init_inode(v9ses, inode, mode, rdev); | 370 | err = v9fs_init_inode(v9ses, inode, mode, rdev); |
@@ -578,15 +580,15 @@ static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags) | |||
578 | struct p9_fid *v9fid, *dfid; | 580 | struct p9_fid *v9fid, *dfid; |
579 | struct v9fs_session_info *v9ses; | 581 | struct v9fs_session_info *v9ses; |
580 | 582 | ||
581 | P9_DPRINTK(P9_DEBUG_VFS, "inode: %p dentry: %p rmdir: %x\n", | 583 | p9_debug(P9_DEBUG_VFS, "inode: %p dentry: %p rmdir: %x\n", |
582 | dir, dentry, flags); | 584 | dir, dentry, flags); |
583 | 585 | ||
584 | v9ses = v9fs_inode2v9ses(dir); | 586 | v9ses = v9fs_inode2v9ses(dir); |
585 | inode = dentry->d_inode; | 587 | inode = dentry->d_inode; |
586 | dfid = v9fs_fid_lookup(dentry->d_parent); | 588 | dfid = v9fs_fid_lookup(dentry->d_parent); |
587 | if (IS_ERR(dfid)) { | 589 | if (IS_ERR(dfid)) { |
588 | retval = PTR_ERR(dfid); | 590 | retval = PTR_ERR(dfid); |
589 | P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", retval); | 591 | p9_debug(P9_DEBUG_VFS, "fid lookup failed %d\n", retval); |
590 | return retval; | 592 | return retval; |
591 | } | 593 | } |
592 | if (v9fs_proto_dotl(v9ses)) | 594 | if (v9fs_proto_dotl(v9ses)) |
@@ -635,7 +637,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, | |||
635 | struct p9_fid *dfid, *ofid, *fid; | 637 | struct p9_fid *dfid, *ofid, *fid; |
636 | struct inode *inode; | 638 | struct inode *inode; |
637 | 639 | ||
638 | P9_DPRINTK(P9_DEBUG_VFS, "name %s\n", dentry->d_name.name); | 640 | p9_debug(P9_DEBUG_VFS, "name %s\n", dentry->d_name.name); |
639 | 641 | ||
640 | err = 0; | 642 | err = 0; |
641 | ofid = NULL; | 643 | ofid = NULL; |
@@ -644,7 +646,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, | |||
644 | dfid = v9fs_fid_lookup(dentry->d_parent); | 646 | dfid = v9fs_fid_lookup(dentry->d_parent); |
645 | if (IS_ERR(dfid)) { | 647 | if (IS_ERR(dfid)) { |
646 | err = PTR_ERR(dfid); | 648 | err = PTR_ERR(dfid); |
647 | P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", err); | 649 | p9_debug(P9_DEBUG_VFS, "fid lookup failed %d\n", err); |
648 | return ERR_PTR(err); | 650 | return ERR_PTR(err); |
649 | } | 651 | } |
650 | 652 | ||
@@ -652,13 +654,13 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, | |||
652 | ofid = p9_client_walk(dfid, 0, NULL, 1); | 654 | ofid = p9_client_walk(dfid, 0, NULL, 1); |
653 | if (IS_ERR(ofid)) { | 655 | if (IS_ERR(ofid)) { |
654 | err = PTR_ERR(ofid); | 656 | err = PTR_ERR(ofid); |
655 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); | 657 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); |
656 | return ERR_PTR(err); | 658 | return ERR_PTR(err); |
657 | } | 659 | } |
658 | 660 | ||
659 | err = p9_client_fcreate(ofid, name, perm, mode, extension); | 661 | err = p9_client_fcreate(ofid, name, perm, mode, extension); |
660 | if (err < 0) { | 662 | if (err < 0) { |
661 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_fcreate failed %d\n", err); | 663 | p9_debug(P9_DEBUG_VFS, "p9_client_fcreate failed %d\n", err); |
662 | goto error; | 664 | goto error; |
663 | } | 665 | } |
664 | 666 | ||
@@ -666,7 +668,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, | |||
666 | fid = p9_client_walk(dfid, 1, &name, 1); | 668 | fid = p9_client_walk(dfid, 1, &name, 1); |
667 | if (IS_ERR(fid)) { | 669 | if (IS_ERR(fid)) { |
668 | err = PTR_ERR(fid); | 670 | err = PTR_ERR(fid); |
669 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); | 671 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); |
670 | fid = NULL; | 672 | fid = NULL; |
671 | goto error; | 673 | goto error; |
672 | } | 674 | } |
@@ -675,7 +677,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir, | |||
675 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); | 677 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); |
676 | if (IS_ERR(inode)) { | 678 | if (IS_ERR(inode)) { |
677 | err = PTR_ERR(inode); | 679 | err = PTR_ERR(inode); |
678 | P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err); | 680 | p9_debug(P9_DEBUG_VFS, "inode creation failed %d\n", err); |
679 | goto error; | 681 | goto error; |
680 | } | 682 | } |
681 | err = v9fs_fid_add(dentry, fid); | 683 | err = v9fs_fid_add(dentry, fid); |
@@ -793,7 +795,7 @@ static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
793 | struct p9_fid *fid; | 795 | struct p9_fid *fid; |
794 | struct v9fs_session_info *v9ses; | 796 | struct v9fs_session_info *v9ses; |
795 | 797 | ||
796 | P9_DPRINTK(P9_DEBUG_VFS, "name %s\n", dentry->d_name.name); | 798 | p9_debug(P9_DEBUG_VFS, "name %s\n", dentry->d_name.name); |
797 | err = 0; | 799 | err = 0; |
798 | v9ses = v9fs_inode2v9ses(dir); | 800 | v9ses = v9fs_inode2v9ses(dir); |
799 | perm = unixmode2p9mode(v9ses, mode | S_IFDIR); | 801 | perm = unixmode2p9mode(v9ses, mode | S_IFDIR); |
@@ -831,8 +833,8 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry, | |||
831 | char *name; | 833 | char *name; |
832 | int result = 0; | 834 | int result = 0; |
833 | 835 | ||
834 | P9_DPRINTK(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", | 836 | p9_debug(P9_DEBUG_VFS, "dir: %p dentry: (%s) %p nameidata: %p\n", |
835 | dir, dentry->d_name.name, dentry, nameidata); | 837 | dir, dentry->d_name.name, dentry, nameidata); |
836 | 838 | ||
837 | if (dentry->d_name.len > NAME_MAX) | 839 | if (dentry->d_name.len > NAME_MAX) |
838 | return ERR_PTR(-ENAMETOOLONG); | 840 | return ERR_PTR(-ENAMETOOLONG); |
@@ -938,7 +940,7 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
938 | struct p9_fid *newdirfid; | 940 | struct p9_fid *newdirfid; |
939 | struct p9_wstat wstat; | 941 | struct p9_wstat wstat; |
940 | 942 | ||
941 | P9_DPRINTK(P9_DEBUG_VFS, "\n"); | 943 | p9_debug(P9_DEBUG_VFS, "\n"); |
942 | retval = 0; | 944 | retval = 0; |
943 | old_inode = old_dentry->d_inode; | 945 | old_inode = old_dentry->d_inode; |
944 | new_inode = new_dentry->d_inode; | 946 | new_inode = new_dentry->d_inode; |
@@ -974,8 +976,7 @@ v9fs_vfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
974 | * 9P .u can only handle file rename in the same directory | 976 | * 9P .u can only handle file rename in the same directory |
975 | */ | 977 | */ |
976 | 978 | ||
977 | P9_DPRINTK(P9_DEBUG_ERROR, | 979 | p9_debug(P9_DEBUG_ERROR, "old dir and new dir are different\n"); |
978 | "old dir and new dir are different\n"); | ||
979 | retval = -EXDEV; | 980 | retval = -EXDEV; |
980 | goto clunk_newdir; | 981 | goto clunk_newdir; |
981 | } | 982 | } |
@@ -1031,7 +1032,7 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
1031 | struct p9_fid *fid; | 1032 | struct p9_fid *fid; |
1032 | struct p9_wstat *st; | 1033 | struct p9_wstat *st; |
1033 | 1034 | ||
1034 | P9_DPRINTK(P9_DEBUG_VFS, "dentry: %p\n", dentry); | 1035 | p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry); |
1035 | err = -EPERM; | 1036 | err = -EPERM; |
1036 | v9ses = v9fs_dentry2v9ses(dentry); | 1037 | v9ses = v9fs_dentry2v9ses(dentry); |
1037 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { | 1038 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { |
@@ -1068,7 +1069,7 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr) | |||
1068 | struct p9_fid *fid; | 1069 | struct p9_fid *fid; |
1069 | struct p9_wstat wstat; | 1070 | struct p9_wstat wstat; |
1070 | 1071 | ||
1071 | P9_DPRINTK(P9_DEBUG_VFS, "\n"); | 1072 | p9_debug(P9_DEBUG_VFS, "\n"); |
1072 | retval = inode_change_ok(dentry->d_inode, iattr); | 1073 | retval = inode_change_ok(dentry->d_inode, iattr); |
1073 | if (retval) | 1074 | if (retval) |
1074 | return retval; | 1075 | return retval; |
@@ -1213,7 +1214,7 @@ static int v9fs_readlink(struct dentry *dentry, char *buffer, int buflen) | |||
1213 | struct p9_fid *fid; | 1214 | struct p9_fid *fid; |
1214 | struct p9_wstat *st; | 1215 | struct p9_wstat *st; |
1215 | 1216 | ||
1216 | P9_DPRINTK(P9_DEBUG_VFS, " %s\n", dentry->d_name.name); | 1217 | p9_debug(P9_DEBUG_VFS, " %s\n", dentry->d_name.name); |
1217 | retval = -EPERM; | 1218 | retval = -EPERM; |
1218 | v9ses = v9fs_dentry2v9ses(dentry); | 1219 | v9ses = v9fs_dentry2v9ses(dentry); |
1219 | fid = v9fs_fid_lookup(dentry); | 1220 | fid = v9fs_fid_lookup(dentry); |
@@ -1235,8 +1236,8 @@ static int v9fs_readlink(struct dentry *dentry, char *buffer, int buflen) | |||
1235 | /* copy extension buffer into buffer */ | 1236 | /* copy extension buffer into buffer */ |
1236 | strncpy(buffer, st->extension, buflen); | 1237 | strncpy(buffer, st->extension, buflen); |
1237 | 1238 | ||
1238 | P9_DPRINTK(P9_DEBUG_VFS, | 1239 | p9_debug(P9_DEBUG_VFS, "%s -> %s (%s)\n", |
1239 | "%s -> %s (%s)\n", dentry->d_name.name, st->extension, buffer); | 1240 | dentry->d_name.name, st->extension, buffer); |
1240 | 1241 | ||
1241 | retval = strnlen(buffer, buflen); | 1242 | retval = strnlen(buffer, buflen); |
1242 | done: | 1243 | done: |
@@ -1257,7 +1258,7 @@ static void *v9fs_vfs_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
1257 | int len = 0; | 1258 | int len = 0; |
1258 | char *link = __getname(); | 1259 | char *link = __getname(); |
1259 | 1260 | ||
1260 | P9_DPRINTK(P9_DEBUG_VFS, "%s n", dentry->d_name.name); | 1261 | p9_debug(P9_DEBUG_VFS, "%s\n", dentry->d_name.name); |
1261 | 1262 | ||
1262 | if (!link) | 1263 | if (!link) |
1263 | link = ERR_PTR(-ENOMEM); | 1264 | link = ERR_PTR(-ENOMEM); |
@@ -1288,8 +1289,8 @@ v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p) | |||
1288 | { | 1289 | { |
1289 | char *s = nd_get_link(nd); | 1290 | char *s = nd_get_link(nd); |
1290 | 1291 | ||
1291 | P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, | 1292 | p9_debug(P9_DEBUG_VFS, " %s %s\n", |
1292 | IS_ERR(s) ? "<error>" : s); | 1293 | dentry->d_name.name, IS_ERR(s) ? "<error>" : s); |
1293 | if (!IS_ERR(s)) | 1294 | if (!IS_ERR(s)) |
1294 | __putname(s); | 1295 | __putname(s); |
1295 | } | 1296 | } |
@@ -1312,7 +1313,7 @@ static int v9fs_vfs_mkspecial(struct inode *dir, struct dentry *dentry, | |||
1312 | 1313 | ||
1313 | v9ses = v9fs_inode2v9ses(dir); | 1314 | v9ses = v9fs_inode2v9ses(dir); |
1314 | if (!v9fs_proto_dotu(v9ses)) { | 1315 | if (!v9fs_proto_dotu(v9ses)) { |
1315 | P9_DPRINTK(P9_DEBUG_ERROR, "not extended\n"); | 1316 | p9_debug(P9_DEBUG_ERROR, "not extended\n"); |
1316 | return -EPERM; | 1317 | return -EPERM; |
1317 | } | 1318 | } |
1318 | 1319 | ||
@@ -1340,8 +1341,8 @@ static int v9fs_vfs_mkspecial(struct inode *dir, struct dentry *dentry, | |||
1340 | static int | 1341 | static int |
1341 | v9fs_vfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) | 1342 | v9fs_vfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) |
1342 | { | 1343 | { |
1343 | P9_DPRINTK(P9_DEBUG_VFS, " %lu,%s,%s\n", dir->i_ino, | 1344 | p9_debug(P9_DEBUG_VFS, " %lu,%s,%s\n", |
1344 | dentry->d_name.name, symname); | 1345 | dir->i_ino, dentry->d_name.name, symname); |
1345 | 1346 | ||
1346 | return v9fs_vfs_mkspecial(dir, dentry, S_IFLNK, symname); | 1347 | return v9fs_vfs_mkspecial(dir, dentry, S_IFLNK, symname); |
1347 | } | 1348 | } |
@@ -1362,9 +1363,8 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir, | |||
1362 | char *name; | 1363 | char *name; |
1363 | struct p9_fid *oldfid; | 1364 | struct p9_fid *oldfid; |
1364 | 1365 | ||
1365 | P9_DPRINTK(P9_DEBUG_VFS, | 1366 | p9_debug(P9_DEBUG_VFS, " %lu,%s,%s\n", |
1366 | " %lu,%s,%s\n", dir->i_ino, dentry->d_name.name, | 1367 | dir->i_ino, dentry->d_name.name, old_dentry->d_name.name); |
1367 | old_dentry->d_name.name); | ||
1368 | 1368 | ||
1369 | oldfid = v9fs_fid_clone(old_dentry); | 1369 | oldfid = v9fs_fid_clone(old_dentry); |
1370 | if (IS_ERR(oldfid)) | 1370 | if (IS_ERR(oldfid)) |
@@ -1403,9 +1403,9 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev) | |||
1403 | int retval; | 1403 | int retval; |
1404 | char *name; | 1404 | char *name; |
1405 | 1405 | ||
1406 | P9_DPRINTK(P9_DEBUG_VFS, | 1406 | p9_debug(P9_DEBUG_VFS, " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", |
1407 | " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", dir->i_ino, | 1407 | dir->i_ino, dentry->d_name.name, mode, |
1408 | dentry->d_name.name, mode, MAJOR(rdev), MINOR(rdev)); | 1408 | MAJOR(rdev), MINOR(rdev)); |
1409 | 1409 | ||
1410 | if (!new_valid_dev(rdev)) | 1410 | if (!new_valid_dev(rdev)) |
1411 | return -EINVAL; | 1411 | return -EINVAL; |
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index 0b5745e21946..73488fb69d38 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c | |||
@@ -283,13 +283,13 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
283 | } | 283 | } |
284 | 284 | ||
285 | name = (char *) dentry->d_name.name; | 285 | name = (char *) dentry->d_name.name; |
286 | P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_create_dotl: name:%s flags:0x%x " | 286 | p9_debug(P9_DEBUG_VFS, "name:%s flags:0x%x mode:0x%x\n", |
287 | "mode:0x%x\n", name, flags, omode); | 287 | name, flags, omode); |
288 | 288 | ||
289 | dfid = v9fs_fid_lookup(dentry->d_parent); | 289 | dfid = v9fs_fid_lookup(dentry->d_parent); |
290 | if (IS_ERR(dfid)) { | 290 | if (IS_ERR(dfid)) { |
291 | err = PTR_ERR(dfid); | 291 | err = PTR_ERR(dfid); |
292 | P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", err); | 292 | p9_debug(P9_DEBUG_VFS, "fid lookup failed %d\n", err); |
293 | return err; | 293 | return err; |
294 | } | 294 | } |
295 | 295 | ||
@@ -297,7 +297,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
297 | ofid = p9_client_walk(dfid, 0, NULL, 1); | 297 | ofid = p9_client_walk(dfid, 0, NULL, 1); |
298 | if (IS_ERR(ofid)) { | 298 | if (IS_ERR(ofid)) { |
299 | err = PTR_ERR(ofid); | 299 | err = PTR_ERR(ofid); |
300 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); | 300 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); |
301 | return err; | 301 | return err; |
302 | } | 302 | } |
303 | 303 | ||
@@ -307,16 +307,15 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
307 | /* Update mode based on ACL value */ | 307 | /* Update mode based on ACL value */ |
308 | err = v9fs_acl_mode(dir, &mode, &dacl, &pacl); | 308 | err = v9fs_acl_mode(dir, &mode, &dacl, &pacl); |
309 | if (err) { | 309 | if (err) { |
310 | P9_DPRINTK(P9_DEBUG_VFS, | 310 | p9_debug(P9_DEBUG_VFS, "Failed to get acl values in creat %d\n", |
311 | "Failed to get acl values in creat %d\n", err); | 311 | err); |
312 | goto error; | 312 | goto error; |
313 | } | 313 | } |
314 | err = p9_client_create_dotl(ofid, name, v9fs_open_to_dotl_flags(flags), | 314 | err = p9_client_create_dotl(ofid, name, v9fs_open_to_dotl_flags(flags), |
315 | mode, gid, &qid); | 315 | mode, gid, &qid); |
316 | if (err < 0) { | 316 | if (err < 0) { |
317 | P9_DPRINTK(P9_DEBUG_VFS, | 317 | p9_debug(P9_DEBUG_VFS, "p9_client_open_dotl failed in creat %d\n", |
318 | "p9_client_open_dotl failed in creat %d\n", | 318 | err); |
319 | err); | ||
320 | goto error; | 319 | goto error; |
321 | } | 320 | } |
322 | v9fs_invalidate_inode_attr(dir); | 321 | v9fs_invalidate_inode_attr(dir); |
@@ -325,14 +324,14 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
325 | fid = p9_client_walk(dfid, 1, &name, 1); | 324 | fid = p9_client_walk(dfid, 1, &name, 1); |
326 | if (IS_ERR(fid)) { | 325 | if (IS_ERR(fid)) { |
327 | err = PTR_ERR(fid); | 326 | err = PTR_ERR(fid); |
328 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); | 327 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", err); |
329 | fid = NULL; | 328 | fid = NULL; |
330 | goto error; | 329 | goto error; |
331 | } | 330 | } |
332 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); | 331 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); |
333 | if (IS_ERR(inode)) { | 332 | if (IS_ERR(inode)) { |
334 | err = PTR_ERR(inode); | 333 | err = PTR_ERR(inode); |
335 | P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", err); | 334 | p9_debug(P9_DEBUG_VFS, "inode creation failed %d\n", err); |
336 | goto error; | 335 | goto error; |
337 | } | 336 | } |
338 | err = v9fs_fid_add(dentry, fid); | 337 | err = v9fs_fid_add(dentry, fid); |
@@ -408,7 +407,7 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, | |||
408 | struct dentry *dir_dentry; | 407 | struct dentry *dir_dentry; |
409 | struct posix_acl *dacl = NULL, *pacl = NULL; | 408 | struct posix_acl *dacl = NULL, *pacl = NULL; |
410 | 409 | ||
411 | P9_DPRINTK(P9_DEBUG_VFS, "name %s\n", dentry->d_name.name); | 410 | p9_debug(P9_DEBUG_VFS, "name %s\n", dentry->d_name.name); |
412 | err = 0; | 411 | err = 0; |
413 | v9ses = v9fs_inode2v9ses(dir); | 412 | v9ses = v9fs_inode2v9ses(dir); |
414 | 413 | ||
@@ -420,7 +419,7 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, | |||
420 | dfid = v9fs_fid_lookup(dir_dentry); | 419 | dfid = v9fs_fid_lookup(dir_dentry); |
421 | if (IS_ERR(dfid)) { | 420 | if (IS_ERR(dfid)) { |
422 | err = PTR_ERR(dfid); | 421 | err = PTR_ERR(dfid); |
423 | P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", err); | 422 | p9_debug(P9_DEBUG_VFS, "fid lookup failed %d\n", err); |
424 | dfid = NULL; | 423 | dfid = NULL; |
425 | goto error; | 424 | goto error; |
426 | } | 425 | } |
@@ -430,8 +429,8 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, | |||
430 | /* Update mode based on ACL value */ | 429 | /* Update mode based on ACL value */ |
431 | err = v9fs_acl_mode(dir, &mode, &dacl, &pacl); | 430 | err = v9fs_acl_mode(dir, &mode, &dacl, &pacl); |
432 | if (err) { | 431 | if (err) { |
433 | P9_DPRINTK(P9_DEBUG_VFS, | 432 | p9_debug(P9_DEBUG_VFS, "Failed to get acl values in mkdir %d\n", |
434 | "Failed to get acl values in mkdir %d\n", err); | 433 | err); |
435 | goto error; | 434 | goto error; |
436 | } | 435 | } |
437 | name = (char *) dentry->d_name.name; | 436 | name = (char *) dentry->d_name.name; |
@@ -444,8 +443,8 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, | |||
444 | fid = p9_client_walk(dfid, 1, &name, 1); | 443 | fid = p9_client_walk(dfid, 1, &name, 1); |
445 | if (IS_ERR(fid)) { | 444 | if (IS_ERR(fid)) { |
446 | err = PTR_ERR(fid); | 445 | err = PTR_ERR(fid); |
447 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", | 446 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", |
448 | err); | 447 | err); |
449 | fid = NULL; | 448 | fid = NULL; |
450 | goto error; | 449 | goto error; |
451 | } | 450 | } |
@@ -453,8 +452,8 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir, | |||
453 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); | 452 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); |
454 | if (IS_ERR(inode)) { | 453 | if (IS_ERR(inode)) { |
455 | err = PTR_ERR(inode); | 454 | err = PTR_ERR(inode); |
456 | P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", | 455 | p9_debug(P9_DEBUG_VFS, "inode creation failed %d\n", |
457 | err); | 456 | err); |
458 | goto error; | 457 | goto error; |
459 | } | 458 | } |
460 | err = v9fs_fid_add(dentry, fid); | 459 | err = v9fs_fid_add(dentry, fid); |
@@ -495,7 +494,7 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry, | |||
495 | struct p9_fid *fid; | 494 | struct p9_fid *fid; |
496 | struct p9_stat_dotl *st; | 495 | struct p9_stat_dotl *st; |
497 | 496 | ||
498 | P9_DPRINTK(P9_DEBUG_VFS, "dentry: %p\n", dentry); | 497 | p9_debug(P9_DEBUG_VFS, "dentry: %p\n", dentry); |
499 | err = -EPERM; | 498 | err = -EPERM; |
500 | v9ses = v9fs_dentry2v9ses(dentry); | 499 | v9ses = v9fs_dentry2v9ses(dentry); |
501 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { | 500 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { |
@@ -537,7 +536,7 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr) | |||
537 | struct p9_fid *fid; | 536 | struct p9_fid *fid; |
538 | struct p9_iattr_dotl p9attr; | 537 | struct p9_iattr_dotl p9attr; |
539 | 538 | ||
540 | P9_DPRINTK(P9_DEBUG_VFS, "\n"); | 539 | p9_debug(P9_DEBUG_VFS, "\n"); |
541 | 540 | ||
542 | retval = inode_change_ok(dentry->d_inode, iattr); | 541 | retval = inode_change_ok(dentry->d_inode, iattr); |
543 | if (retval) | 542 | if (retval) |
@@ -670,14 +669,13 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry, | |||
670 | struct v9fs_session_info *v9ses; | 669 | struct v9fs_session_info *v9ses; |
671 | 670 | ||
672 | name = (char *) dentry->d_name.name; | 671 | name = (char *) dentry->d_name.name; |
673 | P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_symlink_dotl : %lu,%s,%s\n", | 672 | p9_debug(P9_DEBUG_VFS, "%lu,%s,%s\n", dir->i_ino, name, symname); |
674 | dir->i_ino, name, symname); | ||
675 | v9ses = v9fs_inode2v9ses(dir); | 673 | v9ses = v9fs_inode2v9ses(dir); |
676 | 674 | ||
677 | dfid = v9fs_fid_lookup(dentry->d_parent); | 675 | dfid = v9fs_fid_lookup(dentry->d_parent); |
678 | if (IS_ERR(dfid)) { | 676 | if (IS_ERR(dfid)) { |
679 | err = PTR_ERR(dfid); | 677 | err = PTR_ERR(dfid); |
680 | P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", err); | 678 | p9_debug(P9_DEBUG_VFS, "fid lookup failed %d\n", err); |
681 | return err; | 679 | return err; |
682 | } | 680 | } |
683 | 681 | ||
@@ -687,7 +685,7 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry, | |||
687 | err = p9_client_symlink(dfid, name, (char *)symname, gid, &qid); | 685 | err = p9_client_symlink(dfid, name, (char *)symname, gid, &qid); |
688 | 686 | ||
689 | if (err < 0) { | 687 | if (err < 0) { |
690 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_symlink failed %d\n", err); | 688 | p9_debug(P9_DEBUG_VFS, "p9_client_symlink failed %d\n", err); |
691 | goto error; | 689 | goto error; |
692 | } | 690 | } |
693 | 691 | ||
@@ -697,8 +695,8 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry, | |||
697 | fid = p9_client_walk(dfid, 1, &name, 1); | 695 | fid = p9_client_walk(dfid, 1, &name, 1); |
698 | if (IS_ERR(fid)) { | 696 | if (IS_ERR(fid)) { |
699 | err = PTR_ERR(fid); | 697 | err = PTR_ERR(fid); |
700 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", | 698 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", |
701 | err); | 699 | err); |
702 | fid = NULL; | 700 | fid = NULL; |
703 | goto error; | 701 | goto error; |
704 | } | 702 | } |
@@ -707,8 +705,8 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry, | |||
707 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); | 705 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); |
708 | if (IS_ERR(inode)) { | 706 | if (IS_ERR(inode)) { |
709 | err = PTR_ERR(inode); | 707 | err = PTR_ERR(inode); |
710 | P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", | 708 | p9_debug(P9_DEBUG_VFS, "inode creation failed %d\n", |
711 | err); | 709 | err); |
712 | goto error; | 710 | goto error; |
713 | } | 711 | } |
714 | err = v9fs_fid_add(dentry, fid); | 712 | err = v9fs_fid_add(dentry, fid); |
@@ -751,9 +749,8 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir, | |||
751 | struct p9_fid *dfid, *oldfid; | 749 | struct p9_fid *dfid, *oldfid; |
752 | struct v9fs_session_info *v9ses; | 750 | struct v9fs_session_info *v9ses; |
753 | 751 | ||
754 | P9_DPRINTK(P9_DEBUG_VFS, "dir ino: %lu, old_name: %s, new_name: %s\n", | 752 | p9_debug(P9_DEBUG_VFS, "dir ino: %lu, old_name: %s, new_name: %s\n", |
755 | dir->i_ino, old_dentry->d_name.name, | 753 | dir->i_ino, old_dentry->d_name.name, dentry->d_name.name); |
756 | dentry->d_name.name); | ||
757 | 754 | ||
758 | v9ses = v9fs_inode2v9ses(dir); | 755 | v9ses = v9fs_inode2v9ses(dir); |
759 | dir_dentry = v9fs_dentry_from_dir_inode(dir); | 756 | dir_dentry = v9fs_dentry_from_dir_inode(dir); |
@@ -770,7 +767,7 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir, | |||
770 | err = p9_client_link(dfid, oldfid, (char *)dentry->d_name.name); | 767 | err = p9_client_link(dfid, oldfid, (char *)dentry->d_name.name); |
771 | 768 | ||
772 | if (err < 0) { | 769 | if (err < 0) { |
773 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_link failed %d\n", err); | 770 | p9_debug(P9_DEBUG_VFS, "p9_client_link failed %d\n", err); |
774 | return err; | 771 | return err; |
775 | } | 772 | } |
776 | 773 | ||
@@ -813,9 +810,9 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
813 | struct dentry *dir_dentry; | 810 | struct dentry *dir_dentry; |
814 | struct posix_acl *dacl = NULL, *pacl = NULL; | 811 | struct posix_acl *dacl = NULL, *pacl = NULL; |
815 | 812 | ||
816 | P9_DPRINTK(P9_DEBUG_VFS, | 813 | p9_debug(P9_DEBUG_VFS, " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", |
817 | " %lu,%s mode: %x MAJOR: %u MINOR: %u\n", dir->i_ino, | 814 | dir->i_ino, dentry->d_name.name, omode, |
818 | dentry->d_name.name, omode, MAJOR(rdev), MINOR(rdev)); | 815 | MAJOR(rdev), MINOR(rdev)); |
819 | 816 | ||
820 | if (!new_valid_dev(rdev)) | 817 | if (!new_valid_dev(rdev)) |
821 | return -EINVAL; | 818 | return -EINVAL; |
@@ -825,7 +822,7 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
825 | dfid = v9fs_fid_lookup(dir_dentry); | 822 | dfid = v9fs_fid_lookup(dir_dentry); |
826 | if (IS_ERR(dfid)) { | 823 | if (IS_ERR(dfid)) { |
827 | err = PTR_ERR(dfid); | 824 | err = PTR_ERR(dfid); |
828 | P9_DPRINTK(P9_DEBUG_VFS, "fid lookup failed %d\n", err); | 825 | p9_debug(P9_DEBUG_VFS, "fid lookup failed %d\n", err); |
829 | dfid = NULL; | 826 | dfid = NULL; |
830 | goto error; | 827 | goto error; |
831 | } | 828 | } |
@@ -835,8 +832,8 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
835 | /* Update mode based on ACL value */ | 832 | /* Update mode based on ACL value */ |
836 | err = v9fs_acl_mode(dir, &mode, &dacl, &pacl); | 833 | err = v9fs_acl_mode(dir, &mode, &dacl, &pacl); |
837 | if (err) { | 834 | if (err) { |
838 | P9_DPRINTK(P9_DEBUG_VFS, | 835 | p9_debug(P9_DEBUG_VFS, "Failed to get acl values in mknod %d\n", |
839 | "Failed to get acl values in mknod %d\n", err); | 836 | err); |
840 | goto error; | 837 | goto error; |
841 | } | 838 | } |
842 | name = (char *) dentry->d_name.name; | 839 | name = (char *) dentry->d_name.name; |
@@ -851,8 +848,8 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
851 | fid = p9_client_walk(dfid, 1, &name, 1); | 848 | fid = p9_client_walk(dfid, 1, &name, 1); |
852 | if (IS_ERR(fid)) { | 849 | if (IS_ERR(fid)) { |
853 | err = PTR_ERR(fid); | 850 | err = PTR_ERR(fid); |
854 | P9_DPRINTK(P9_DEBUG_VFS, "p9_client_walk failed %d\n", | 851 | p9_debug(P9_DEBUG_VFS, "p9_client_walk failed %d\n", |
855 | err); | 852 | err); |
856 | fid = NULL; | 853 | fid = NULL; |
857 | goto error; | 854 | goto error; |
858 | } | 855 | } |
@@ -860,8 +857,8 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode, | |||
860 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); | 857 | inode = v9fs_get_new_inode_from_fid(v9ses, fid, dir->i_sb); |
861 | if (IS_ERR(inode)) { | 858 | if (IS_ERR(inode)) { |
862 | err = PTR_ERR(inode); | 859 | err = PTR_ERR(inode); |
863 | P9_DPRINTK(P9_DEBUG_VFS, "inode creation failed %d\n", | 860 | p9_debug(P9_DEBUG_VFS, "inode creation failed %d\n", |
864 | err); | 861 | err); |
865 | goto error; | 862 | goto error; |
866 | } | 863 | } |
867 | err = v9fs_fid_add(dentry, fid); | 864 | err = v9fs_fid_add(dentry, fid); |
@@ -905,7 +902,7 @@ v9fs_vfs_follow_link_dotl(struct dentry *dentry, struct nameidata *nd) | |||
905 | char *link = __getname(); | 902 | char *link = __getname(); |
906 | char *target; | 903 | char *target; |
907 | 904 | ||
908 | P9_DPRINTK(P9_DEBUG_VFS, "%s\n", dentry->d_name.name); | 905 | p9_debug(P9_DEBUG_VFS, "%s\n", dentry->d_name.name); |
909 | 906 | ||
910 | if (!link) { | 907 | if (!link) { |
911 | link = ERR_PTR(-ENOMEM); | 908 | link = ERR_PTR(-ENOMEM); |
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c index c70251d47ed1..06d1973598a2 100644 --- a/fs/9p/vfs_super.c +++ b/fs/9p/vfs_super.c | |||
@@ -121,7 +121,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, | |||
121 | struct p9_fid *fid; | 121 | struct p9_fid *fid; |
122 | int retval = 0; | 122 | int retval = 0; |
123 | 123 | ||
124 | P9_DPRINTK(P9_DEBUG_VFS, " \n"); | 124 | p9_debug(P9_DEBUG_VFS, "\n"); |
125 | 125 | ||
126 | v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); | 126 | v9ses = kzalloc(sizeof(struct v9fs_session_info), GFP_KERNEL); |
127 | if (!v9ses) | 127 | if (!v9ses) |
@@ -191,7 +191,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags, | |||
191 | goto release_sb; | 191 | goto release_sb; |
192 | v9fs_fid_add(root, fid); | 192 | v9fs_fid_add(root, fid); |
193 | 193 | ||
194 | P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n"); | 194 | p9_debug(P9_DEBUG_VFS, " simple set mount, return 0\n"); |
195 | return dget(sb->s_root); | 195 | return dget(sb->s_root); |
196 | 196 | ||
197 | clunk_fid: | 197 | clunk_fid: |
@@ -223,7 +223,7 @@ static void v9fs_kill_super(struct super_block *s) | |||
223 | { | 223 | { |
224 | struct v9fs_session_info *v9ses = s->s_fs_info; | 224 | struct v9fs_session_info *v9ses = s->s_fs_info; |
225 | 225 | ||
226 | P9_DPRINTK(P9_DEBUG_VFS, " %p\n", s); | 226 | p9_debug(P9_DEBUG_VFS, " %p\n", s); |
227 | 227 | ||
228 | kill_anon_super(s); | 228 | kill_anon_super(s); |
229 | 229 | ||
@@ -231,7 +231,7 @@ static void v9fs_kill_super(struct super_block *s) | |||
231 | v9fs_session_close(v9ses); | 231 | v9fs_session_close(v9ses); |
232 | kfree(v9ses); | 232 | kfree(v9ses); |
233 | s->s_fs_info = NULL; | 233 | s->s_fs_info = NULL; |
234 | P9_DPRINTK(P9_DEBUG_VFS, "exiting kill_super\n"); | 234 | p9_debug(P9_DEBUG_VFS, "exiting kill_super\n"); |
235 | } | 235 | } |
236 | 236 | ||
237 | static void | 237 | static void |
@@ -303,7 +303,7 @@ static int v9fs_write_inode(struct inode *inode, | |||
303 | * send an fsync request to server irrespective of | 303 | * send an fsync request to server irrespective of |
304 | * wbc->sync_mode. | 304 | * wbc->sync_mode. |
305 | */ | 305 | */ |
306 | P9_DPRINTK(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode); | 306 | p9_debug(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode); |
307 | v9inode = V9FS_I(inode); | 307 | v9inode = V9FS_I(inode); |
308 | if (!v9inode->writeback_fid) | 308 | if (!v9inode->writeback_fid) |
309 | return 0; | 309 | return 0; |
@@ -326,7 +326,7 @@ static int v9fs_write_inode_dotl(struct inode *inode, | |||
326 | * send an fsync request to server irrespective of | 326 | * send an fsync request to server irrespective of |
327 | * wbc->sync_mode. | 327 | * wbc->sync_mode. |
328 | */ | 328 | */ |
329 | P9_DPRINTK(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode); | 329 | p9_debug(P9_DEBUG_VFS, "%s: inode %p\n", __func__, inode); |
330 | v9inode = V9FS_I(inode); | 330 | v9inode = V9FS_I(inode); |
331 | if (!v9inode->writeback_fid) | 331 | if (!v9inode->writeback_fid) |
332 | return 0; | 332 | return 0; |
diff --git a/fs/9p/xattr.c b/fs/9p/xattr.c index d288773871b3..29653b70a9c3 100644 --- a/fs/9p/xattr.c +++ b/fs/9p/xattr.c | |||
@@ -32,8 +32,8 @@ ssize_t v9fs_fid_xattr_get(struct p9_fid *fid, const char *name, | |||
32 | attr_fid = p9_client_xattrwalk(fid, name, &attr_size); | 32 | attr_fid = p9_client_xattrwalk(fid, name, &attr_size); |
33 | if (IS_ERR(attr_fid)) { | 33 | if (IS_ERR(attr_fid)) { |
34 | retval = PTR_ERR(attr_fid); | 34 | retval = PTR_ERR(attr_fid); |
35 | P9_DPRINTK(P9_DEBUG_VFS, | 35 | p9_debug(P9_DEBUG_VFS, "p9_client_attrwalk failed %zd\n", |
36 | "p9_client_attrwalk failed %zd\n", retval); | 36 | retval); |
37 | attr_fid = NULL; | 37 | attr_fid = NULL; |
38 | goto error; | 38 | goto error; |
39 | } | 39 | } |
@@ -87,8 +87,8 @@ ssize_t v9fs_xattr_get(struct dentry *dentry, const char *name, | |||
87 | { | 87 | { |
88 | struct p9_fid *fid; | 88 | struct p9_fid *fid; |
89 | 89 | ||
90 | P9_DPRINTK(P9_DEBUG_VFS, "%s: name = %s value_len = %zu\n", | 90 | p9_debug(P9_DEBUG_VFS, "name = %s value_len = %zu\n", |
91 | __func__, name, buffer_size); | 91 | name, buffer_size); |
92 | fid = v9fs_fid_lookup(dentry); | 92 | fid = v9fs_fid_lookup(dentry); |
93 | if (IS_ERR(fid)) | 93 | if (IS_ERR(fid)) |
94 | return PTR_ERR(fid); | 94 | return PTR_ERR(fid); |
@@ -115,8 +115,8 @@ int v9fs_xattr_set(struct dentry *dentry, const char *name, | |||
115 | int retval, msize, write_count; | 115 | int retval, msize, write_count; |
116 | struct p9_fid *fid = NULL; | 116 | struct p9_fid *fid = NULL; |
117 | 117 | ||
118 | P9_DPRINTK(P9_DEBUG_VFS, "%s: name = %s value_len = %zu flags = %d\n", | 118 | p9_debug(P9_DEBUG_VFS, "name = %s value_len = %zu flags = %d\n", |
119 | __func__, name, value_len, flags); | 119 | name, value_len, flags); |
120 | 120 | ||
121 | fid = v9fs_fid_clone(dentry); | 121 | fid = v9fs_fid_clone(dentry); |
122 | if (IS_ERR(fid)) { | 122 | if (IS_ERR(fid)) { |
@@ -129,8 +129,8 @@ int v9fs_xattr_set(struct dentry *dentry, const char *name, | |||
129 | */ | 129 | */ |
130 | retval = p9_client_xattrcreate(fid, name, value_len, flags); | 130 | retval = p9_client_xattrcreate(fid, name, value_len, flags); |
131 | if (retval < 0) { | 131 | if (retval < 0) { |
132 | P9_DPRINTK(P9_DEBUG_VFS, | 132 | p9_debug(P9_DEBUG_VFS, "p9_client_xattrcreate failed %d\n", |
133 | "p9_client_xattrcreate failed %d\n", retval); | 133 | retval); |
134 | goto error; | 134 | goto error; |
135 | } | 135 | } |
136 | msize = fid->clnt->msize; | 136 | msize = fid->clnt->msize; |