[LU-5412] mdd_unlink() may pass a NULL object to mdd_write_unlock() Created: 24/Jul/14  Updated: 25/Jul/14  Resolved: 25/Jul/14

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.7.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: WC Triage
Resolution: Duplicate Votes: 0
Labels: mdd

Issue Links:
Duplicate
is duplicated by LU-5413 mdd_write_lock leaks Resolved
Severity: 3
Rank (Obsolete): 15053

 Description   

In mdd_unlink() the cobj may be NULL (when called from rm_entry and maybe in other cases). When this is so if mdd_update_time() fails then we call mdd_write_unlock(env, mdd_cobj) with a NULL mdd_cobj.

        la->la_valid = LA_CTIME | LA_MTIME;
        rc = mdd_update_time(env, mdd_pobj, pattr, la, handle);
        if (rc)
                GOTO(cleanup, rc);

        /* Enough for only unlink the entry */
        if (unlikely(mdd_cobj == NULL))
                GOTO(stop, rc);

...
cleanup:
        mdd_write_unlock(env, mdd_cobj);
...


 Comments   
Comment by John Hammond [ 25/Jul/14 ]

The change for this issue was rolled into the patch for LU-5413.

Generated at Sat Feb 10 01:51:16 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.