aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ncpfs/inode.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-04-08 19:04:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-04-08 19:48:52 -0400
commitd3b73ca1be3236fc33f896af7e2ba637a677d5c9 (patch)
tree40cb8fd92cf4c76867a2d01477bd5c2f2e7f42ba /fs/ncpfs/inode.c
parentb41f8b84d01d32ea618dbbe5679bd07ce3444b88 (diff)
ncpfs: convert DPRINTK/DDPRINTK to ncp_dbg
Use a more current logging style and enable use of dynamic debugging. Remove embedded function names, dynamic debug can add this instead. Signed-off-by: Joe Perches <joe@perches.com> Cc: Petr Vandrovec <petr@vandrovec.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ncpfs/inode.c')
-rw-r--r--fs/ncpfs/inode.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 3277fc132959..f4c5bbafd73f 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -135,7 +135,7 @@ void ncp_update_inode(struct inode *inode, struct ncp_entry_info *nwinfo)
135 NCP_FINFO(inode)->access = nwinfo->access; 135 NCP_FINFO(inode)->access = nwinfo->access;
136 memcpy(NCP_FINFO(inode)->file_handle, nwinfo->file_handle, 136 memcpy(NCP_FINFO(inode)->file_handle, nwinfo->file_handle,
137 sizeof(nwinfo->file_handle)); 137 sizeof(nwinfo->file_handle));
138 DPRINTK("ncp_update_inode: updated %s, volnum=%d, dirent=%u\n", 138 ncp_dbg(1, "updated %s, volnum=%d, dirent=%u\n",
139 nwinfo->i.entryName, NCP_FINFO(inode)->volNumber, 139 nwinfo->i.entryName, NCP_FINFO(inode)->volNumber,
140 NCP_FINFO(inode)->dirEntNum); 140 NCP_FINFO(inode)->dirEntNum);
141} 141}
@@ -143,8 +143,7 @@ void ncp_update_inode(struct inode *inode, struct ncp_entry_info *nwinfo)
143static void ncp_update_dates(struct inode *inode, struct nw_info_struct *nwi) 143static void ncp_update_dates(struct inode *inode, struct nw_info_struct *nwi)
144{ 144{
145 /* NFS namespace mode overrides others if it's set. */ 145 /* NFS namespace mode overrides others if it's set. */
146 DPRINTK(KERN_DEBUG "ncp_update_dates_and_mode: (%s) nfs.mode=0%o\n", 146 ncp_dbg(1, "(%s) nfs.mode=0%o\n", nwi->entryName, nwi->nfs.mode);
147 nwi->entryName, nwi->nfs.mode);
148 if (nwi->nfs.mode) { 147 if (nwi->nfs.mode) {
149 /* XXX Security? */ 148 /* XXX Security? */
150 inode->i_mode = nwi->nfs.mode; 149 inode->i_mode = nwi->nfs.mode;
@@ -232,7 +231,7 @@ static void ncp_set_attr(struct inode *inode, struct ncp_entry_info *nwinfo)
232 231
233 ncp_update_attrs(inode, nwinfo); 232 ncp_update_attrs(inode, nwinfo);
234 233
235 DDPRINTK("ncp_read_inode: inode->i_mode = %u\n", inode->i_mode); 234 ncp_dbg(2, "inode->i_mode = %u\n", inode->i_mode);
236 235
237 set_nlink(inode, 1); 236 set_nlink(inode, 1);
238 inode->i_uid = server->m.uid; 237 inode->i_uid = server->m.uid;
@@ -303,7 +302,7 @@ ncp_evict_inode(struct inode *inode)
303 clear_inode(inode); 302 clear_inode(inode);
304 303
305 if (S_ISDIR(inode->i_mode)) { 304 if (S_ISDIR(inode->i_mode)) {
306 DDPRINTK("ncp_evict_inode: put directory %ld\n", inode->i_ino); 305 ncp_dbg(2, "put directory %ld\n", inode->i_ino);
307 } 306 }
308 307
309 if (ncp_make_closed(inode) != 0) { 308 if (ncp_make_closed(inode) != 0) {
@@ -684,7 +683,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
684 ncp_unlock_server(server); 683 ncp_unlock_server(server);
685 if (error < 0) 684 if (error < 0)
686 goto out_rxbuf; 685 goto out_rxbuf;
687 DPRINTK("ncp_fill_super: NCP_SBP(sb) = %x\n", (int) NCP_SBP(sb)); 686 ncp_dbg(1, "NCP_SBP(sb) = %x\n", (int) NCP_SBP(sb));
688 687
689 error = -EMSGSIZE; /* -EREMOTESIDEINCOMPATIBLE */ 688 error = -EMSGSIZE; /* -EREMOTESIDEINCOMPATIBLE */
690#ifdef CONFIG_NCPFS_PACKET_SIGNING 689#ifdef CONFIG_NCPFS_PACKET_SIGNING
@@ -712,7 +711,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
712 if (ncp_negotiate_buffersize(server, default_bufsize, 711 if (ncp_negotiate_buffersize(server, default_bufsize,
713 &(server->buffer_size)) != 0) 712 &(server->buffer_size)) != 0)
714 goto out_disconnect; 713 goto out_disconnect;
715 DPRINTK("ncpfs: bufsize = %d\n", server->buffer_size); 714 ncp_dbg(1, "bufsize = %d\n", server->buffer_size);
716 715
717 memset(&finfo, 0, sizeof(finfo)); 716 memset(&finfo, 0, sizeof(finfo));
718 finfo.i.attributes = aDIR; 717 finfo.i.attributes = aDIR;
@@ -741,7 +740,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
741 root_inode = ncp_iget(sb, &finfo); 740 root_inode = ncp_iget(sb, &finfo);
742 if (!root_inode) 741 if (!root_inode)
743 goto out_disconnect; 742 goto out_disconnect;
744 DPRINTK("ncp_fill_super: root vol=%d\n", NCP_FINFO(root_inode)->volNumber); 743 ncp_dbg(1, "root vol=%d\n", NCP_FINFO(root_inode)->volNumber);
745 sb->s_root = d_make_root(root_inode); 744 sb->s_root = d_make_root(root_inode);
746 if (!sb->s_root) 745 if (!sb->s_root)
747 goto out_disconnect; 746 goto out_disconnect;
@@ -987,8 +986,7 @@ int ncp_notify_change(struct dentry *dentry, struct iattr *attr)
987 if ((attr->ia_valid & ATTR_SIZE) != 0) { 986 if ((attr->ia_valid & ATTR_SIZE) != 0) {
988 int written; 987 int written;
989 988
990 DPRINTK("ncpfs: trying to change size to %ld\n", 989 ncp_dbg(1, "trying to change size to %ld\n", attr->ia_size);
991 attr->ia_size);
992 990
993 if ((result = ncp_make_open(inode, O_WRONLY)) < 0) { 991 if ((result = ncp_make_open(inode, O_WRONLY)) < 0) {
994 result = -EACCES; 992 result = -EACCES;
@@ -1074,7 +1072,7 @@ MODULE_ALIAS_FS("ncpfs");
1074static int __init init_ncp_fs(void) 1072static int __init init_ncp_fs(void)
1075{ 1073{
1076 int err; 1074 int err;
1077 DPRINTK("ncpfs: init_ncp_fs called\n"); 1075 ncp_dbg(1, "called\n");
1078 1076
1079 err = init_inodecache(); 1077 err = init_inodecache();
1080 if (err) 1078 if (err)
@@ -1091,7 +1089,7 @@ out1:
1091 1089
1092static void __exit exit_ncp_fs(void) 1090static void __exit exit_ncp_fs(void)
1093{ 1091{
1094 DPRINTK("ncpfs: exit_ncp_fs called\n"); 1092 ncp_dbg(1, "called\n");
1095 unregister_filesystem(&ncp_fs_type); 1093 unregister_filesystem(&ncp_fs_type);
1096 destroy_inodecache(); 1094 destroy_inodecache();
1097} 1095}