aboutsummaryrefslogtreecommitdiff
path: root/sys/ufs/ffs/ffs_snapshot.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2018-11-13 21:40:56 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2018-11-13 21:40:56 +0000
commit9fc5d538fc57f438ca860e07db191b946b4768c9 (patch)
tree0f73178df156f836c4d9dde3af92b526b95c4e72 /sys/ufs/ffs/ffs_snapshot.c
parentf183fb162c1dbc58cc3f7e2c27891bd881db2bf2 (diff)
downloadsrc-9fc5d538fc57f438ca860e07db191b946b4768c9.tar.gz
src-9fc5d538fc57f438ca860e07db191b946b4768c9.zip
In preparation for adding inode check-hashes, clean up and
document the libufs interface for fetching and storing inodes. The undocumented getino / putino interface has been replaced with a new getinode / putinode interface. Convert the utilities that had been using the undocumented interface to use the new documented interface. No functional change (as for now the libufs library does not do inode check-hashes). Reviewed by: kib Tested by: Peter Holm Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=340411
Diffstat (limited to 'sys/ufs/ffs/ffs_snapshot.c')
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 4453c59517df..09b1d4982c49 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -1333,12 +1333,12 @@ expunge_ufs2(snapvp, cancelip, fs, acctfunc, expungetype, clearmode)
*/
dip = (struct ufs2_dinode *)bp->b_data +
ino_to_fsbo(fs, cancelip->i_number);
- if (clearmode || cancelip->i_effnlink == 0)
- dip->di_mode = 0;
dip->di_size = 0;
dip->di_blocks = 0;
dip->di_flags &= ~SF_SNAPSHOT;
bzero(&dip->di_db[0], (UFS_NDADDR + UFS_NIADDR) * sizeof(ufs2_daddr_t));
+ if (clearmode || cancelip->i_effnlink == 0)
+ dip->di_mode = 0;
bdwrite(bp);
/*
* Now go through and expunge all the blocks in the file