aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_addr.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-11-28 13:40:46 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2012-01-05 11:51:44 -0500
commit5d3851530d6d68564e4e0ce04d0547d4d106fc72 (patch)
treed47065fcc1f93f00070afe597a98ab185fd13859 /fs/9p/vfs_addr.c
parenta0ea787b027b79cf2e01c6758e5246db06520158 (diff)
9p: Reduce object size with CONFIG_NET_9P_DEBUG
Reduce object size by deduplicating formats. Use vsprintf extension %pV. Rename P9_DPRINTK uses to p9_debug, align arguments. Add function for _p9_debug and macro to add __func__. Add missing "\n"s to p9_debug uses. Remove embedded function names as p9_debug adds it. Remove P9_EPRINTK macro and convert use to pr_<level>. Add and use pr_fmt and pr_<level>. $ size fs/9p/built-in.o* text data bss dec hex filename 62133 984 16000 79117 1350d fs/9p/built-in.o.new 67342 984 16928 85254 14d06 fs/9p/built-in.o.old $ size net/9p/built-in.o* text data bss dec hex filename 88792 4148 22024 114964 1c114 net/9p/built-in.o.new 94072 4148 23232 121452 1da6c net/9p/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_addr.c')
-rw-r--r--fs/9p/vfs_addr.c13
1 files changed, 6 insertions, 7 deletions
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}