From: green Date: Thu, 24 Apr 2008 05:58:37 +0000 (+0000) Subject: b=14712 X-Git-Tag: v1_8_0_110~598 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=cf9275d2131c3631bfb011b1185ede2fd2b235c3;p=fs%2Flustre-release.git b=14712 r=vitaly,shadow Do not free request that we do not have refcount on on open error --- diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 023f778..85c143c 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -519,6 +519,13 @@ Bugzilla : 15566 Description: Update an obsolete wirecheck.c generator Details : Update wirecheck.c/wirehdr.c and regenerate wiretest.c +Severity : normal +Bugzilla : 14712 +Description: Client can panic on open sometimes +Details : It is possible that we try to free already freed request in + ll_file_open in some error cases when we send request from + ll_file_open + -------------------------------------------------------------------------------- 2007-12-07 Cluster File Systems, Inc. diff --git a/lustre/llite/file.c b/lustre/llite/file.c index d50d49a..ddaa5ab 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -486,8 +486,9 @@ restart: let's close it somehow. This will decref request. */ rc = it_open_error(DISP_OPEN_OPEN, it); if (rc) { + up(&lli->lli_och_sem); ll_file_data_put(fd); - GOTO(out_och_free, rc); + GOTO(out_openerr, rc); } ll_release_openhandle(file->f_dentry, it); lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, @@ -513,11 +514,6 @@ restart: GOTO(out_openerr, rc); } - /* Got some error? Release the request */ - if (it->d.lustre.it_status < 0) { - req = it->d.lustre.it_data; - ptlrpc_req_finished(req); - } mdc_set_lock_data(&it->d.lustre.it_lock_handle, file->f_dentry->d_inode); goto restart;