Whamcloud - gitweb
LU-11943 llog: Reset current log on ENOSPC
[fs/lustre-release.git] / lustre / obdclass / llog_cat.c
index dbb2c39..c5b15f1 100644 (file)
@@ -579,12 +579,7 @@ retry:
                        up_write(&loghandle->lgh_lock);
                        /* nobody should be trying to use this llog */
                        down_write(&cathandle->lgh_lock);
                        up_write(&loghandle->lgh_lock);
                        /* nobody should be trying to use this llog */
                        down_write(&cathandle->lgh_lock);
-                       /* only reset current log if still room in catalog, to
-                        * avoid unnecessarily and racy creation of new and
-                        * partially initialized llog_handle
-                        */
-                       if ((cathandle->u.chd.chd_current_log == loghandle) &&
-                           rc != -ENOSPC)
+                       if (cathandle->u.chd.chd_current_log == loghandle)
                                cathandle->u.chd.chd_current_log = NULL;
                        up_write(&cathandle->lgh_lock);
                        RETURN(rc);
                                cathandle->u.chd.chd_current_log = NULL;
                        up_write(&cathandle->lgh_lock);
                        RETURN(rc);