]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Fix rollback of mounted filesystem regression
authorTim Chase <tim@chase2k.com>
Sun, 10 Nov 2013 01:22:06 +0000 (19:22 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 14 Nov 2013 18:44:03 +0000 (10:44 -0800)
The Illumos #3875 patch reverted a part of ZoL's 7b3e34b which added
special-case error handling for zfs_rezget().  The error handling dealt
with the case in which an all-ones object number ended up being passed
to dnode_hold() and causing an EINVAL to be returned from zfs_rezget().

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1859
Closes #1861

module/zfs/zfs_vfsops.c

index 9097273e449d5b8cae3ff695490f697f70e35386..5c65b964ae0d1c6670d3a658907109970b54d783 100644 (file)
@@ -1480,7 +1480,7 @@ EXPORT_SYMBOL(zfs_suspend_fs);
 int
 zfs_resume_fs(zfs_sb_t *zsb, const char *osname)
 {
-       int err;
+       int err, err2;
        znode_t *zp;
        uint64_t sa_obj = 0;
 
@@ -1537,8 +1537,8 @@ zfs_resume_fs(zfs_sb_t *zsb, const char *osname)
        mutex_enter(&zsb->z_znodes_lock);
        for (zp = list_head(&zsb->z_all_znodes); zp;
            zp = list_next(&zsb->z_all_znodes, zp)) {
-               err = zfs_rezget(zp);
-               if (err) {
+               err2 = zfs_rezget(zp);
+               if (err2) {
                        remove_inode_hash(ZTOI(zp));
                        zp->z_is_stale = B_TRUE;
                }