for llap_from_page call in ll_removepage prevents from taking the
superblock lock for a soon died page.
+Severity : normal
+Frequency : rare
+Bugzilla : 11935
+Description: Not check open intent error before release open handle
+Details : in some rare cases, the open intent error is not checked before
+ release open handle, which may cause
+ ASSERTION(open_req->rq_transno != 0), because it tries to release
+ the failed open handle.
+
--------------------------------------------------------------------------------
2007-05-03 Cluster File Systems, Inc. <info@clusterfs.com>
/* reason for keep own exit path - don`t flood log
* with messages with -ESTALE errors.
*/
- if (!it_disposition(itp, DISP_OPEN_OPEN))
+ if (!it_disposition(itp, DISP_OPEN_OPEN) ||
+ it_open_error(DISP_OPEN_OPEN, itp))
GOTO(out, rc);
ll_release_openhandle(file->f_dentry, itp);
GOTO(out_stale, rc);
}
- if (rc != 0) {
- CERROR("lock enqueue: err: %d\n", rc);
- GOTO(out, rc);
+ if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) {
+ rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, itp);
+ CERROR("lock enqueue: err: %d\n", rc);
+ GOTO(out, rc);
}
if (itp->d.lustre.it_lock_mode)
if (it_disposition(it, DISP_OPEN_OPEN)) {
/* Well, there's extra open request that we do not need,
let's close it somehow. This will decref request. */
+ rc = it_open_error(DISP_OPEN_OPEN, it);
+ if (rc) {
+ ll_file_data_put(fd);
+ GOTO(out_och_free, rc);
+ }
ll_release_openhandle(file->f_dentry, it);
+ lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats,
+ LPROC_LL_OPEN);
}
(*och_usecount)++;
rc = oit.d.lustre.it_status;
- if (rc < 0) {
+ if (rc < 0 || it_open_error(DISP_OPEN_OPEN, &oit)) {
+ rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, &oit);
ptlrpc_req_finished((struct ptlrpc_request *)
- oit.d.lustre.it_data);
+ oit.d.lustre.it_data);
GOTO(out, rc);
}
if (!it_disposition(it, DISP_OPEN_OPEN))
RETURN(0);
+ LASSERT(it_open_error(DISP_OPEN_OPEN, it) == 0);
+
OBD_ALLOC(och, sizeof(*och));
if (!och)
GOTO(out, rc = -ENOMEM);