2013/2/7 <jiang.biao2@xxxxxxxxxx>: >> I think we should do end_page_writeback(wdata->pages[i]) and >> page_cache_release(wdata->pages[i]) regardless whether rc is 0 or not >> (we are doing the same things in cifs_writev_complete now). Thoughts? > Actually,if rc=0 in cifs_writev_requeue, end_page_writeback(wdata->pages[i]) > and > page_cache_release(wdata->pages[i]) have been done in cifs_writev_complete, > and we > should not worry about that.What we need fix here is the situation when > rc!=0. Ok. We go into cifs_writev_complete with wdata->sync_mode == WB_SYNC_ALL and wdata->result == -EAGAIN. In this case we call cifs_write_requeue: } else if (wdata->sync_mode == WB_SYNC_ALL && wdata->result == -EAGAIN) return cifs_writev_requeue(wdata);" end_page_writeback and page_cache_release are called after the statement above - so, if we hit in cifs_writev_requeue, they are not called anymore. That's why we should call them from cifs_writev_requeue unconditionally. -- Best regards, Pavel Shilovsky. -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html