]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
cifs: bugfix for unreclaimed writeback pages in cifs_writev_requeue()
authorOuyang Maochun <ouyang.maochun@zte.com.cn>
Mon, 18 Feb 2013 15:54:52 +0000 (09:54 -0600)
committerSteve French <sfrench@us.ibm.com>
Thu, 28 Feb 2013 15:01:47 +0000 (09:01 -0600)
commitc51bb0ea40ca038da26b1fa7d450f4078124af03
treebf3f85dbf6263612dbdea9676670d75777a9d895
parent0b7bc84000d71f3647ca33ab1bf5bd928535c846
cifs: bugfix for unreclaimed writeback pages in cifs_writev_requeue()

Pages get the PG_writeback flag set before cifs sends its
request to SMB server in cifs_writepages(), if the SMB service
goes down, cifs may try to recommit the writing requests in
cifs_writev_requeue(). However, it does not clean its PG_writeback
flag and relaimed the pages even if it fails again in
cifs_writev_requeue(), which may lead to the hanging of the
processes accessing the cifs directory. This patch just cleans
the PG_writeback flags and reclaims the pages under that circumstances.

    Steps to reproduce the bug(trying serveral times may trigger the issue):
    1.Write from cifs client continuously.(e.g dd if=/dev/zero of=<cifs file>)
    2.Stop SMB service from server.(e.g service smb stop)
    3.Wait for two minutes, and then start SMB service from
server.(e.g service smb start)
    4.The processes which are accessing cifs directory may hang up.

Signed-off-by: Ouyang Maochun <ouyang.maochun@zte.com.cn>
Signed-off-by: Jiang Yong <jian.yong5@zte.com.cn>
Tested-by: Zhang Xianwei <zhang.xianwei8@zte.com.cn>
Reviewed-by: Wang Liang <wang.liang82@zte.com.cn>
Reviewed-by: Cai Qu <cai.qu@zte.com.cn>
Reviewed-by: Jiang Biao <jiang.biao2@zte.com.cn>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifssmb.c