* of the GNU General Public License version 2.
*/
-#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/completion.h>
if (error)
goto out_gunlock_q;
- error = gfs2_trans_begin(sdp, al->al_rgd->rd_ri.ri_length +
+ error = gfs2_trans_begin(sdp, al->al_rgd->rd_length +
ind_blocks + RES_DINODE +
RES_STATFS + RES_QUOTA, 0);
if (error)
if (alloc_required) {
error = alloc_page_backing(ip, result);
if (error) {
+ if (area->vm_flags & VM_CAN_INVALIDATE)
+ unlock_page(result);
page_cache_release(result);
result = NULL;
goto out;