Merge branch 'queue' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[firefly-linux-kernel-4.4.55.git] / fs / jfs / jfs_imap.c
index 6ba4006e011b84eedb3e42de213e20d6ae34ce0b..f7e042b63ddb255011c81e02ead0ed944e24c540 100644 (file)
@@ -1493,7 +1493,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip)
                /* mask any prior bits for the starting words of the
                 * summary map.
                 */
-               mask = ONES << (EXTSPERSUM - bitno);
+               mask = (bitno == 0) ? 0 : (ONES << (EXTSPERSUM - bitno));
                inosmap = le32_to_cpu(iagp->inosmap[sword]) | mask;
                extsmap = le32_to_cpu(iagp->extsmap[sword]) | mask;