aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/xattr.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/xattr.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/xattr.c')
-rw-r--r--fs/9p/xattr.c16
1 files changed, 8 insertions, 8 deletions
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;