浏览代码

[CIFS] Fix minor problem with previous patch

The patch
	NFS stress test generates flood of "close with pending write

was missing an if

Signed-off-by: Steve French <sfrench@us.ibm.com>
Steve French 18 年之前
父节点
当前提交
f7b2e8c76b
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      fs/cifs/file.c

+ 2 - 1
fs/cifs/file.c

@@ -498,7 +498,8 @@ int cifs_close(struct inode *inode, struct file *file)
 					msleep(timeout);
 					timeout *= 4;
 				}
-				cERROR(1,("close with pending writes")); 
+				if(atomic_read(&pSMBFile->wrtPending))
+					cERROR(1,("close with pending writes"));
 				rc = CIFSSMBClose(xid, pTcon,
 						  pSMBFile->netfid);
 			}