]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
nfs+maildir: lseek() may also return ESTALE failure, handle it.
authorTimo Sirainen <tss@iki.fi>
Mon, 2 Feb 2009 19:57:33 +0000 (14:57 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 2 Feb 2009 19:57:33 +0000 (14:57 -0500)
--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-uidlist.c

index 0fe4911e73a784a27bb4bf81121d1587a54b5b6b..579d1a808f87606775517c0c191063d1f2bf0786 100644 (file)
@@ -603,6 +603,10 @@ maildir_uidlist_update_read(struct maildir_uidlist *uidlist,
                /* the file was updated */
                fd = uidlist->fd;
                if (lseek(fd, 0, SEEK_SET) < 0) {
+                       if (errno == ESTALE && try_retry) {
+                               *retry_r = TRUE;
+                               return -1;
+                       }
                        mail_storage_set_critical(storage,
                                "lseek(%s) failed: %m", uidlist->path);
                        return -1;