diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index 2b5bf1c26a9f..0c011eaafb34 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -292,9 +292,10 @@ ffs_snapshot(mp, snapfile) ip->i_size = lblktosize(fs, (off_t)numblks); DIP_SET(ip, i_size, ip->i_size); ip->i_flag |= IN_CHANGE | IN_UPDATE; - if ((error = readblock(vp, bp, numblks - 1)) != 0) - goto out; + error = readblock(vp, bp, numblks - 1); bawrite(bp); + if (error != 0) + goto out; /* * Preallocate critical data structures so that we can copy * them in without further allocation after we suspend all