diff --git a/fs/smbfs/dir.c b/fs/smbfs/dir.c index c6c33e15143ab68baa8c944f14b108f391d1cad2..0424d06b147e3832273b068f2389b99057c28e0a 100644 --- a/fs/smbfs/dir.c +++ b/fs/smbfs/dir.c @@ -209,6 +209,8 @@ smb_readdir(struct file *filp, void *dirent, filldir_t filldir) ctl.valid = 1; read_really: result = server->ops->readdir(filp, dirent, filldir, &ctl); + if (result == -ERESTARTSYS && page) + ClearPageUptodate(page); if (ctl.idx == -1) goto invalid_cache; /* retry */ ctl.head.end = ctl.fpos - 1; @@ -217,7 +219,8 @@ smb_readdir(struct file *filp, void *dirent, filldir_t filldir) if (page) { cache->head = ctl.head; kunmap(page); - SetPageUptodate(page); + if (result != -ERESTARTSYS) + SetPageUptodate(page); unlock_page(page); page_cache_release(page); }