gfs2_assert(sdp, bd->bd_ail == ai);
if (!buffer_busy(bh)) {
- if (!buffer_uptodate(bh))
+ if (!buffer_uptodate(bh)) {
+ gfs2_log_unlock(sdp);
gfs2_io_error_bh(sdp, bh);
+ gfs2_log_lock(sdp);
+ }
list_move(&bd->bd_ail_st_list,
&ai->ai_ail2_list);
continue;
if (error)
goto out_gunlock_q;
- error = gfs2_trans_begin(sdp,
- sdp->sd_max_dirres +
+ error = gfs2_trans_begin(sdp, sdp->sd_max_dirres +
al->al_rgd->rd_ri.ri_length +
2 * RES_DINODE + RES_STATFS +
RES_QUOTA, 0);
if (error)
goto out_gunlock;
- error = gfs2_unlinki(dip, &dentry->d_name, ip,ul);
+ error = gfs2_unlinki(dip, &dentry->d_name, ip, ul);
gfs2_trans_end(sdp);
if (!PageUptodate(page)) {
void *kaddr = kmap(page);
- memcpy(kaddr,
- dibh->b_data + sizeof(struct gfs2_dinode),
+ memcpy(kaddr, dibh->b_data + sizeof(struct gfs2_dinode),
ip->i_di.di_size);
- memset(kaddr + ip->i_di.di_size,
- 0,
+ memset(kaddr + ip->i_di.di_size, 0,
PAGE_CACHE_SIZE - ip->i_di.di_size);
kunmap(page);
unsigned int tries = 0, min = 0;
int error;
- if (atomic_read(&sdp->sd_unlinked_count) >=
- gfs2_tune_get(sdp, gt_ilimit)) {
- tries = gfs2_tune_get(sdp, gt_ilimit_tries);
- min = gfs2_tune_get(sdp, gt_ilimit_min);
- }
+ if (atomic_read(&sdp->sd_unlinked_count) <
+ gfs2_tune_get(sdp, gt_ilimit))
+ return;
+
+ tries = gfs2_tune_get(sdp, gt_ilimit_tries);
+ min = gfs2_tune_get(sdp, gt_ilimit_min);
while (tries--) {
struct gfs2_unlinked *ul = ul_fish(sdp);
goto fail;
- found:
+found:
for (b = 0; b < 8; b++)
if (!(byte & (1 << b)))
break;
return 0;
- fail:
+fail:
spin_unlock(&sdp->sd_unlinked_spin);
kfree(*ul);
return -ENOSPC;
return 0;
- fail:
+fail:
gfs2_unlinked_cleanup(sdp);
return error;
}