GFS2: Remove rs_requested field from reservations
[firefly-linux-kernel-4.4.55.git] / fs / gfs2 / trans.h
index 41f42cdccbb8e5bb3669bc36a159bcc5f6492e90..bf2ae9aeee7ab1208f42cea980e382fa5d183b7f 100644 (file)
@@ -28,11 +28,10 @@ struct gfs2_glock;
 
 /* reserve either the number of blocks to be allocated plus the rg header
  * block, or all of the blocks in the rg, whichever is smaller */
-static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip)
+static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip, unsigned requested)
 {
-       const struct gfs2_blkreserv *rs = ip->i_res;
-       if (rs && rs->rs_requested < ip->i_rgd->rd_length)
-               return rs->rs_requested + 1;
+       if (requested < ip->i_rgd->rd_length)
+               return requested + 1;
        return ip->i_rgd->rd_length;
 }