]> git.ipfire.org Git - people/ms/linux.git/blobdiff - fs/jfs/jfs_dmap.c
fs/jfs: Remove dead code
[people/ms/linux.git] / fs / jfs / jfs_dmap.c
index e75f31b81d63444dab3d43e2d66c5d42e045b994..6b838d3ae7c2e13ff855ea5b34a26b75c91b269d 100644 (file)
@@ -869,74 +869,6 @@ int dbAlloc(struct inode *ip, s64 hint, s64 nblocks, s64 * results)
        return (rc);
 }
 
-#ifdef _NOTYET
-/*
- * NAME:       dbAllocExact()
- *
- * FUNCTION:   try to allocate the requested extent;
- *
- * PARAMETERS:
- *     ip      - pointer to in-core inode;
- *     blkno   - extent address;
- *     nblocks - extent length;
- *
- * RETURN VALUES:
- *     0       - success
- *     -ENOSPC - insufficient disk resources
- *     -EIO    - i/o error
- */
-int dbAllocExact(struct inode *ip, s64 blkno, int nblocks)
-{
-       int rc;
-       struct inode *ipbmap = JFS_SBI(ip->i_sb)->ipbmap;
-       struct bmap *bmp = JFS_SBI(ip->i_sb)->bmap;
-       struct dmap *dp;
-       s64 lblkno;
-       struct metapage *mp;
-
-       IREAD_LOCK(ipbmap, RDWRLOCK_DMAP);
-
-       /*
-        * validate extent request:
-        *
-        * note: defragfs policy:
-        *  max 64 blocks will be moved.
-        *  allocation request size must be satisfied from a single dmap.
-        */
-       if (nblocks <= 0 || nblocks > BPERDMAP || blkno >= bmp->db_mapsize) {
-               IREAD_UNLOCK(ipbmap);
-               return -EINVAL;
-       }
-
-       if (nblocks > ((s64) 1 << bmp->db_maxfreebud)) {
-               /* the free space is no longer available */
-               IREAD_UNLOCK(ipbmap);
-               return -ENOSPC;
-       }
-
-       /* read in the dmap covering the extent */
-       lblkno = BLKTODMAP(blkno, bmp->db_l2nbperpage);
-       mp = read_metapage(ipbmap, lblkno, PSIZE, 0);
-       if (mp == NULL) {
-               IREAD_UNLOCK(ipbmap);
-               return -EIO;
-       }
-       dp = (struct dmap *) mp->data;
-
-       /* try to allocate the requested extent */
-       rc = dbAllocNext(bmp, dp, blkno, nblocks);
-
-       IREAD_UNLOCK(ipbmap);
-
-       if (rc == 0)
-               mark_metapage_dirty(mp);
-
-       release_metapage(mp);
-
-       return (rc);
-}
-#endif /* _NOTYET */
-
 /*
  * NAME:       dbReAlloc()
  *