提交 bce3481c 编写于 作者: T Trond Myklebust

This fixes a panic doing the first READDIR or READDIRPLUS call when:

* the client is ia64 or any platform that actually implements
    flush_dcache_page(), and

  * the server returns fsinfo.dtpref >= client's PAGE_SIZE, and

  * the server does *not* return post-op attributes for the directory
    in the READDIR reply.

Problem diagnosed by Greg Banks <gnb@melbourne.sgi.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 83715ad5
...@@ -191,7 +191,6 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, ...@@ -191,7 +191,6 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
do { do {
/* Are any pointers crossing a page boundary? */ /* Are any pointers crossing a page boundary? */
if (pgto_base == 0) { if (pgto_base == 0) {
flush_dcache_page(*pgto);
pgto_base = PAGE_CACHE_SIZE; pgto_base = PAGE_CACHE_SIZE;
pgto--; pgto--;
} }
...@@ -211,11 +210,11 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base, ...@@ -211,11 +210,11 @@ _shift_data_right_pages(struct page **pages, size_t pgto_base,
vto = kmap_atomic(*pgto, KM_USER0); vto = kmap_atomic(*pgto, KM_USER0);
vfrom = kmap_atomic(*pgfrom, KM_USER1); vfrom = kmap_atomic(*pgfrom, KM_USER1);
memmove(vto + pgto_base, vfrom + pgfrom_base, copy); memmove(vto + pgto_base, vfrom + pgfrom_base, copy);
flush_dcache_page(*pgto);
kunmap_atomic(vfrom, KM_USER1); kunmap_atomic(vfrom, KM_USER1);
kunmap_atomic(vto, KM_USER0); kunmap_atomic(vto, KM_USER0);
} while ((len -= copy) != 0); } while ((len -= copy) != 0);
flush_dcache_page(*pgto);
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册