Merge tag 'at91-ab-4.8-drivers2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / fs / nilfs2 / direct.c
index ebf89fd..251a449 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
- * Written by Koji Sato <koji@osrg.net>.
+ * Written by Koji Sato.
  */
 
 #include <linux/errno.h>
@@ -62,7 +58,7 @@ static int nilfs_direct_lookup(const struct nilfs_bmap *direct,
 
 static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct,
                                      __u64 key, __u64 *ptrp,
-                                     unsigned maxblocks)
+                                     unsigned int maxblocks)
 {
        struct inode *dat = NULL;
        __u64 ptr, ptr2;
@@ -83,7 +79,8 @@ static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct,
                ptr = blocknr;
        }
 
-       maxblocks = min_t(unsigned, maxblocks, NILFS_DIRECT_KEY_MAX - key + 1);
+       maxblocks = min_t(unsigned int, maxblocks,
+                         NILFS_DIRECT_KEY_MAX - key + 1);
        for (cnt = 1; cnt < maxblocks &&
                     (ptr2 = nilfs_direct_get_ptr(direct, key + cnt)) !=
                     NILFS_BMAP_INVALID_PTR;
@@ -110,9 +107,9 @@ nilfs_direct_find_target_v(const struct nilfs_bmap *direct, __u64 key)
        if (ptr != NILFS_BMAP_INVALID_PTR)
                /* sequential access */
                return ptr;
-       else
-               /* block group */
-               return nilfs_bmap_find_target_in_group(direct);
+
+       /* block group */
+       return nilfs_bmap_find_target_in_group(direct);
 }
 
 static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)