From: vs Date: Tue, 26 Aug 2008 08:49:27 +0000 (+0000) Subject: Branch HEAD X-Git-Tag: v1_7_110~48 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=a69df236c911899c2477d0b1c01305b5bd30ffc6;p=fs%2Flustre-release.git Branch HEAD b=16274 i=nikita.danilov, yury.umanets ll_file_open error handling is corrected --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 73fb0a7..0b7082c 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -579,8 +579,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, @@ -590,9 +591,10 @@ restart: rc = ll_local_open(file, it, fd, NULL); if (rc) { + (*och_usecount)--; up(&lli->lli_och_sem); ll_file_data_put(fd); - RETURN(rc); + GOTO(out_openerr, rc); } } else { LASSERT(*och_usecount == 0); @@ -643,7 +645,6 @@ restart: ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_OPEN, 1); rc = ll_local_open(file, it, fd, *och_p); if (rc) { - up(&lli->lli_och_sem); ll_file_data_put(fd); GOTO(out_och_free, rc); }