@@ -17,7 +17,7 @@ static loff_t get_pos(struct dnode *d, struct hpfs_dirent *fde)
1717 if (de == fde ) return ((loff_t ) le32_to_cpu (d -> self ) << 4 ) | (loff_t )i ;
1818 i ++ ;
1919 }
20- printk ("HPFS: get_pos: not_found\n" );
20+ pr_info ("HPFS: get_pos: not_found\n" );
2121 return ((loff_t )le32_to_cpu (d -> self ) << 4 ) | (loff_t )1 ;
2222}
2323
@@ -32,7 +32,7 @@ void hpfs_add_pos(struct inode *inode, loff_t *pos)
3232 if (hpfs_inode -> i_rddir_off [i ] == pos ) return ;
3333 if (!(i & 0x0f )) {
3434 if (!(ppos = kmalloc ((i + 0x11 ) * sizeof (loff_t * ), GFP_NOFS ))) {
35- printk ("HPFS: out of memory for position list\n" );
35+ pr_warn ("HPFS: out of memory for position list\n" );
3636 return ;
3737 }
3838 if (hpfs_inode -> i_rddir_off ) {
@@ -63,7 +63,8 @@ void hpfs_del_pos(struct inode *inode, loff_t *pos)
6363 }
6464 return ;
6565 not_f :
66- /*printk("HPFS: warning: position pointer %p->%08x not found\n", pos, (int)*pos);*/
66+ /*pr_info("HPFS: warning: position pointer %p->%08x not found\n",
67+ pos, (int)*pos);*/
6768 return ;
6869}
6970
@@ -92,17 +93,23 @@ static void hpfs_pos_ins(loff_t *p, loff_t d, loff_t c)
9293{
9394 if ((* p & ~0x3f ) == (d & ~0x3f ) && (* p & 0x3f ) >= (d & 0x3f )) {
9495 int n = (* p & 0x3f ) + c ;
95- if (n > 0x3f ) printk ("HPFS: hpfs_pos_ins: %08x + %d\n" , (int )* p , (int )c >> 8 );
96- else * p = (* p & ~0x3f ) | n ;
96+ if (n > 0x3f )
97+ pr_warn ("HPFS: hpfs_pos_ins: %08x + %d\n" ,
98+ (int )* p , (int )c >> 8 );
99+ else
100+ * p = (* p & ~0x3f ) | n ;
97101 }
98102}
99103
100104static void hpfs_pos_del (loff_t * p , loff_t d , loff_t c )
101105{
102106 if ((* p & ~0x3f ) == (d & ~0x3f ) && (* p & 0x3f ) >= (d & 0x3f )) {
103107 int n = (* p & 0x3f ) - c ;
104- if (n < 1 ) printk ("HPFS: hpfs_pos_ins: %08x - %d\n" , (int )* p , (int )c >> 8 );
105- else * p = (* p & ~0x3f ) | n ;
108+ if (n < 1 )
109+ pr_warn ("HPFS: hpfs_pos_ins: %08x - %d\n" ,
110+ (int )* p , (int )c >> 8 );
111+ else
112+ * p = (* p & ~0x3f ) | n ;
106113 }
107114}
108115
@@ -239,7 +246,7 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
239246 struct fnode * fnode ;
240247 int c1 , c2 = 0 ;
241248 if (!(nname = kmalloc (256 , GFP_NOFS ))) {
242- printk ("HPFS: out of memory, can't add to dnode\n" );
249+ pr_warn ("HPFS: out of memory, can't add to dnode\n" );
243250 return 1 ;
244251 }
245252 go_up :
@@ -281,7 +288,7 @@ static int hpfs_add_to_dnode(struct inode *i, dnode_secno dno,
281288 not be any error while splitting dnodes, otherwise the
282289 whole directory, not only file we're adding, would
283290 be lost. */
284- printk ("HPFS: out of memory for dnode splitting\n" );
291+ pr_warn ("HPFS: out of memory for dnode splitting\n" );
285292 hpfs_brelse4 (& qbh );
286293 kfree (nname );
287294 return 1 ;
@@ -597,7 +604,7 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
597604 if (!de_next -> down ) goto endm ;
598605 ndown = de_down_pointer (de_next );
599606 if (!(de_cp = kmalloc (le16_to_cpu (de -> length ), GFP_NOFS ))) {
600- printk ("HPFS: out of memory for dtree balancing\n" );
607+ pr_warn ("HPFS: out of memory for dtree balancing\n" );
601608 goto endm ;
602609 }
603610 memcpy (de_cp , de , le16_to_cpu (de -> length ));
@@ -612,7 +619,8 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
612619 hpfs_brelse4 (& qbh1 );
613620 }
614621 hpfs_add_to_dnode (i , ndown , de_cp -> name , de_cp -> namelen , de_cp , de_cp -> down ? de_down_pointer (de_cp ) : 0 );
615- /*printk("UP-TO-DNODE: %08x (ndown = %08x, down = %08x, dno = %08x)\n", up, ndown, down, dno);*/
622+ /*pr_info("UP-TO-DNODE: %08x (ndown = %08x, down = %08x, dno = %08x)\n",
623+ up, ndown, down, dno);*/
616624 dno = up ;
617625 kfree (de_cp );
618626 goto try_it_again ;
@@ -637,15 +645,15 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
637645 if (!dlp && down ) {
638646 if (le32_to_cpu (d1 -> first_free ) > 2044 ) {
639647 if (hpfs_sb (i -> i_sb )-> sb_chk >= 2 ) {
640- printk ("HPFS: warning: unbalanced dnode tree, see hpfs.txt 4 more info\n" );
641- printk ("HPFS: warning: terminating balancing operation\n" );
648+ pr_warn ("HPFS: warning: unbalanced dnode tree, see hpfs.txt 4 more info\n" );
649+ pr_warn ("HPFS: warning: terminating balancing operation\n" );
642650 }
643651 hpfs_brelse4 (& qbh1 );
644652 goto endm ;
645653 }
646654 if (hpfs_sb (i -> i_sb )-> sb_chk >= 2 ) {
647- printk ("HPFS: warning: unbalanced dnode tree, see hpfs.txt 4 more info\n" );
648- printk ("HPFS: warning: goin'on\n" );
655+ pr_warn ("HPFS: warning: unbalanced dnode tree, see hpfs.txt 4 more info\n" );
656+ pr_warn ("HPFS: warning: goin'on\n" );
649657 }
650658 le16_add_cpu (& del -> length , 4 );
651659 del -> down = 1 ;
@@ -659,7 +667,7 @@ static void delete_empty_dnode(struct inode *i, dnode_secno dno)
659667 * (__le32 * ) ((void * ) del + le16_to_cpu (del -> length ) - 4 ) = cpu_to_le32 (down );
660668 } else goto endm ;
661669 if (!(de_cp = kmalloc (le16_to_cpu (de_prev -> length ), GFP_NOFS ))) {
662- printk ("HPFS: out of memory for dtree balancing\n" );
670+ pr_warn ("HPFS: out of memory for dtree balancing\n" );
663671 hpfs_brelse4 (& qbh1 );
664672 goto endm ;
665673 }
@@ -1000,7 +1008,7 @@ struct hpfs_dirent *map_fnode_dirent(struct super_block *s, fnode_secno fno,
10001008 int d1 , d2 = 0 ;
10011009 name1 = f -> name ;
10021010 if (!(name2 = kmalloc (256 , GFP_NOFS ))) {
1003- printk ("HPFS: out of memory, can't map dirent\n" );
1011+ pr_warn ("HPFS: out of memory, can't map dirent\n" );
10041012 return NULL ;
10051013 }
10061014 if (f -> len <= 15 )
0 commit comments