Whamcloud - gitweb
LU-11775 osc: check if opg is in lru list without locking
[fs/lustre-release.git] / lustre / osc / osc_page.c
index ff64374..cd4107b 100644 (file)
@@ -516,6 +516,8 @@ static void osc_lru_use(struct client_obd *cli, struct osc_page *opg)
        /* If page is being transferred for the first time,
         * ops_lru should be empty */
        if (opg->ops_in_lru) {
+               if (list_empty(&opg->ops_lru))
+                       return;
                spin_lock(&cli->cl_lru_list_lock);
                if (!list_empty(&opg->ops_lru)) {
                        __osc_lru_del(cli, opg);