]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] remove unreachable code (and comments) in fs/befs/linuxvfs.c
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 1 Apr 2003 11:53:25 +0000 (03:53 -0800)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Tue, 1 Apr 2003 11:53:25 +0000 (03:53 -0800)
From:  Will Dyson <will_dyson@pobox.com>

fs/befs/btree.c
fs/befs/linuxvfs.c

index b885cf1822e03d497cce02e04170dbb7d54aabc2..5d93d273509befc198615aa7e244cc07bdaf2f04 100644 (file)
@@ -324,7 +324,7 @@ befs_btree_find(struct super_block *sb, befs_data_stream * ds,
  *
  * finds exact match if one exists, and returns BEFS_BT_MATCH
  * If no exact match, finds first key in node that is greater
- * (alpabeticly) than the search key and returns BEFS_BT_PARMATCH
+ * (alphabetically) than the search key and returns BEFS_BT_PARMATCH
  * (for partial match, I guess). Can you think of something better to
  * call it?
  *
@@ -402,9 +402,9 @@ befs_find_key(struct super_block *sb, befs_btree_node * node,
  * @value: Value stored with the returned key
  *
  * Heres how it works: Key_no is the index of the key/value pair to 
- * retun in keybuf/value.
+ * return in keybuf/value.
  * Bufsize is the size of keybuf (BEFS_NAME_LEN+1 is a good size). Keysize is 
- * the number of charecters in the key (just a convience).
+ * the number of charecters in the key (just a convenience).
  *
  * Algorithm:
  *   Get the first leafnode of the tree. See if the requested key is in that
@@ -530,7 +530,7 @@ befs_btree_read(struct super_block *sb, befs_data_stream * ds,
  * befs_btree_seekleaf - Find the first leafnode in the btree
  * @sb: Filesystem superblock
  * @ds: Datastream containing btree
- * @bt_super: Pointer to the uperblock of the btree
+ * @bt_super: Pointer to the superblock of the btree
  * @this_node: Buffer to return the leafnode in
  * @node_off: Pointer to offset of current node within datastream. Modified
  *             by the function.
@@ -615,10 +615,10 @@ befs_leafnode(befs_btree_node * node)
  * of the B+tree node *@node
  *
  * "The length of all the keys in the node is added to the size of the
- * header and then rounded up to a multiple of four to get the begining
+ * header and then rounded up to a multiple of four to get the beginning
  * of the key length index" (p.88, practical filesystem design).
  *
- * Exept that rounding up to 8 works, and rounding up to 4 doesn't.
+ * Except that rounding up to 8 works, and rounding up to 4 doesn't.
  */
 static u16 *
 befs_bt_keylen_index(befs_btree_node * node)
@@ -704,7 +704,7 @@ befs_bt_get_key(struct super_block *sb, befs_btree_node * node,
  * @key1: pointer to the first key to be compared 
  * @keylen1: length in bytes of key1
  * @key2: pointer to the second key to be compared
- * @kelen2: lenght in bytes of key2
+ * @kelen2: length in bytes of key2
  *
  * Returns 0 if @key1 and @key2 are equal.
  * Returns >0 if @key1 is greater.
index 0b5772d6fc947dceb75c8e4075ef5582632a5082..8fff0ea711d9abb6cb0033a1f88b117c2777d905 100644 (file)
@@ -345,7 +345,7 @@ befs_read_inode(struct inode *inode)
        /*
         * set uid and gid.  But since current BeOS is single user OS, so
         * you can change by "uid" or "gid" options.
-        */
+        */   
 
        inode->i_uid = befs_sb->mount_opts.use_uid ?
            befs_sb->mount_opts.uid : (uid_t) fs32_to_cpu(sb, raw_inode->uid);
@@ -358,11 +358,14 @@ befs_read_inode(struct inode *inode)
         * BEFS's time is 64 bits, but current VFS is 32 bits...
         * BEFS don't have access time. Nor inode change time. VFS
         * doesn't have creation time.
+        * Also, the lower 16 bits of the last_modified_time and 
+        * create_time are just a counter to help ensure uniqueness
+        * for indexing purposes. (PFD, page 54)
         */
 
        inode->i_mtime.tv_sec =
            fs64_to_cpu(sb, raw_inode->last_modified_time) >> 16;
-       inode->i_mtime.tv_nsec = 0;   /* use the lower bits ? */        
+       inode->i_mtime.tv_nsec = 0;   /* lower 16 bits are not a time */        
        inode->i_ctime = inode->i_mtime;
        inode->i_atime = inode->i_mtime;
        inode->i_blksize = befs_sb->block_size;
@@ -527,6 +530,7 @@ befs_readlink(struct dentry *dentry, char *buffer, int buflen)
 
 /*
  * UTF-8 to NLS charset  convert routine
+ * 
  *
  * Changed 8/10/01 by Will Dyson. Now use uni2char() / char2uni() rather than
  * the nls tables directly
@@ -572,11 +576,11 @@ befs_utf2nls(struct super_block *sb, const char *in,
                }
        }
        result[o] = '\0';
+       *out_len = o;
 
        befs_debug(sb, "<--- utf2nls()");
 
        return o;
-       *out_len = o;
 
       conv_err:
        befs_error(sb, "Name using charecter set %s contains a charecter that "
@@ -602,8 +606,8 @@ befs_utf2nls(struct super_block *sb, const char *in,
  * 
  * On return, *@destlen is the length of @dest in bytes.
  *
- * On success, the return value is the number of utf8 charecters written to
- * the ouput buffer @dest.
+ * On success, the return value is the number of utf8 characters written to
+ * the output buffer @dest.
  *  
  * On Failure, a negative number coresponding to the error code is returned.
  */