patch-2.1.18 linux/fs/xiafs/inode.c

Next file: linux/include/asm-alpha/unistd.h
Previous file: linux/fs/vfat/namei.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.17/linux/fs/xiafs/inode.c linux/fs/xiafs/inode.c
@@ -2,7 +2,7 @@
  *  linux/fs/xiafs/inode.c
  *
  *  Copyright (C) Q. Frank Xia, 1993.
- *  
+ *
  *  Based on Linus' minix/inode.c
  *  Copyright (C) Linus Torvalds, 1991, 1992.
  *
@@ -24,7 +24,7 @@
 #include "xiafs_mac.h"
 
 static u_long random_nr;
-  
+
 void xiafs_put_inode(struct inode *inode)
 {
     if (inode->i_nlink)
@@ -48,7 +48,7 @@
     MOD_DEC_USE_COUNT;
 }
 
-static struct super_operations xiafs_sops = { 
+static struct super_operations xiafs_sops = {
     xiafs_read_inode,
     NULL,
     xiafs_write_inode,
@@ -94,8 +94,8 @@
     }
     s->s_blocksize = sp->s_zone_size;
     s->s_blocksize_bits = 10 + sp->s_zone_shift;
-    if (s->s_blocksize != BLOCK_SIZE && 
-	(s->s_blocksize == 1024 || s->s_blocksize == 2048 ||  
+    if (s->s_blocksize != BLOCK_SIZE &&
+	(s->s_blocksize == 1024 || s->s_blocksize == 2048 ||
 	 s->s_blocksize == 4096)) {
       brelse(bh);
       set_blocksize(dev, s->s_blocksize);
@@ -148,7 +148,7 @@
     s->s_dev = dev;
     s->s_op = &xiafs_sops;
     s->s_mounted = iget(s, _XIAFS_ROOT_INO);
-    if (!s->s_mounted) 
+    if (!s->s_mounted)
         goto xiafs_read_super_fail;
     unlock_super(s);
     random_nr=CURRENT_TIME;
@@ -220,7 +220,7 @@
     zone -= XIAFS_ADDRS_PER_Z(inode->i_sb);
     i = inode->u.xiafs_i.i_dind_zone;
     if (i)
-      i = zone_bmap(bread(inode->i_dev, i, XIAFS_ZSIZE(inode->i_sb)), 
+      i = zone_bmap(bread(inode->i_dev, i, XIAFS_ZSIZE(inode->i_sb)),
 		    zone >> XIAFS_ADDRS_PER_Z_BITS(inode->i_sb));
     if (i)
       i= zone_bmap(bread(inode->i_dev,i, XIAFS_ZSIZE(inode->i_sb)),
@@ -240,7 +240,7 @@
     return random_nr + inode->i_sb->u.xiafs_sb.s_firstdatazone;
 }
 
-static struct buffer_head * 
+static struct buffer_head *
 dt_getblk(struct inode * inode, u_long *lp, int create, u_long prev_addr)
 {
     int tmp;
@@ -270,8 +270,8 @@
     return result;
 }
 
-static struct buffer_head * 
-indt_getblk(struct inode * inode, struct buffer_head * bh, 
+static struct buffer_head *
+indt_getblk(struct inode * inode, struct buffer_head * bh,
 	    int nr, int create, u_long prev_addr)
 {
     int tmp;
@@ -347,9 +347,9 @@
     }
     zone -= XIAFS_ADDRS_PER_Z(inode->i_sb);
     bh = dt_getblk(inode, &(inode->u.xiafs_i.i_dind_zone), create, prev_addr);
-    bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb), 
+    bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb),
 		     create, prev_addr);
-    bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1), 
+    bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1),
 		     create, prev_addr);
     return bh;
 }
@@ -390,7 +390,7 @@
     	printk("XIA-FS: read i-node zone failed (%s %d)\n", WHERE_ERR);
     	return;
     }
-    raw_inode = ((struct xiafs_inode *) bh->b_data) + 
+    raw_inode = ((struct xiafs_inode *) bh->b_data) +
                  ((ino-1) & (XIAFS_INODES_PER_Z(inode->i_sb) - 1));
     inode->i_mode = raw_inode->i_mode;
     inode->i_uid = raw_inode->i_uid;
@@ -445,7 +445,7 @@
     	inode->i_dirt=0;
     	return 0;
     }
-    zone = 1 + inode->i_sb->u.xiafs_sb.s_imap_zones + 
+    zone = 1 + inode->i_sb->u.xiafs_sb.s_imap_zones +
                 inode->i_sb->u.xiafs_sb.s_zmap_zones +
 		(ino-1) / XIAFS_INODES_PER_Z(inode->i_sb);
     if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) {
@@ -468,7 +468,7 @@
     else {
         XIAFS_PUT_BLOCKS(raw_inode, inode->i_blocks);
         for (zone = 0; zone < 8; zone++)
-	    raw_inode->i_zone[zone] = (raw_inode->i_zone[zone] & 0xff000000) 
+	    raw_inode->i_zone[zone] = (raw_inode->i_zone[zone] & 0xff000000)
 	                             | (inode->u.xiafs_i.i_zone[zone] & 0xffffff);
 	raw_inode->i_ind_zone = (raw_inode->i_ind_zone & 0xff000000)
 	                             | (inode->u.xiafs_i.i_ind_zone   & 0xffffff);
@@ -523,13 +523,11 @@
 }
 
 #ifdef MODULE
+EXPORT_NO_SYMBOLS;
+
 int init_module(void)
 {
-	int status;
-
-	if ((status = init_xiafs_fs()) == 0)
-		register_symtab(0);
-	return status;
+	return init_xiafs_fs();
 }
 
 void cleanup_module(void)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov