staging: lustre: cleanup not needed else clauses
[sfrench/cifs-2.6.git] / drivers / staging / lustre / lustre / obdclass / llog_cat.c
index c8f6ab006124f742f933fdc661b5a272c2e86c8e..48dbbcf977020d150a6898f8bcd734b3c1718d4d 100644 (file)
@@ -279,9 +279,8 @@ static struct llog_handle *llog_cat_current_log(struct llog_handle *cathandle,
                    loghandle->lgh_last_idx < LLOG_BITMAP_SIZE(llh) - 1) {
                        up_read(&cathandle->lgh_lock);
                        return loghandle;
-               } else {
-                       up_write(&loghandle->lgh_lock);
                }
+               up_write(&loghandle->lgh_lock);
        }
        up_read(&cathandle->lgh_lock);
 
@@ -299,9 +298,8 @@ static struct llog_handle *llog_cat_current_log(struct llog_handle *cathandle,
                if (loghandle->lgh_last_idx < LLOG_BITMAP_SIZE(llh) - 1) {
                        up_write(&cathandle->lgh_lock);
                        return loghandle;
-               } else {
-                       up_write(&loghandle->lgh_lock);
                }
+               up_write(&loghandle->lgh_lock);
        }
 
        CDEBUG(D_INODE, "use next log\n");