diff options
author | kib <kib@FreeBSD.org> | 2011-03-20 21:05:09 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-03-20 21:05:09 +0000 |
commit | a174b18d0c5a09c13c6c92586ee72b6fffb83c58 (patch) | |
tree | 55ff34a58a4b31404c6deb983d15f302ecd6bb39 /sys/ufs | |
parent | b5db9ff6043a2c9c72e6399a365b3b216c1b6be2 (diff) | |
download | FreeBSD-src-a174b18d0c5a09c13c6c92586ee72b6fffb83c58.zip FreeBSD-src-a174b18d0c5a09c13c6c92586ee72b6fffb83c58.tar.gz |
Retire opt_ffs_broken_fixme.h.
Instead of directly calling ffs_snapgone(), use UFS_SNAPGONE() with
usual layering.
Requested by: bde
MFC after: 1 week
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 1 | ||||
-rw-r--r-- | sys/ufs/ufs/ufs_lookup.c | 5 | ||||
-rw-r--r-- | sys/ufs/ufs/ufsmount.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index f578382..573c364 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -797,6 +797,7 @@ ffs_mountfs(devvp, mp, td) ump->um_vfree = ffs_vfree; ump->um_ifree = ffs_ifree; ump->um_rdonly = ffs_rdonly; + ump->um_snapgone = ffs_snapgone; mtx_init(UFS_MTX(ump), "FFS", "FFS Lock", MTX_DEF); bcopy(bp->b_data, ump->um_fs, (u_int)fs->fs_sbsize); if (fs->fs_sbsize < SBLOCKSIZE) diff --git a/sys/ufs/ufs/ufs_lookup.c b/sys/ufs/ufs/ufs_lookup.c index d819f69..45ebea1 100644 --- a/sys/ufs/ufs/ufs_lookup.c +++ b/sys/ufs/ufs/ufs_lookup.c @@ -37,7 +37,6 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); -#include "opt_ffs_broken_fixme.h" #include "opt_ufs.h" #include "opt_quota.h" @@ -1253,7 +1252,7 @@ out: * when last open reference goes away. */ if (ip != 0 && (ip->i_flags & SF_SNAPSHOT) != 0 && ip->i_effnlink == 0) - ffs_snapgone(ip); + UFS_SNAPGONE(ip); return (error); } @@ -1316,7 +1315,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir) * when last open reference goes away. */ if ((oip->i_flags & SF_SNAPSHOT) != 0 && oip->i_effnlink == 0) - ffs_snapgone(oip); + UFS_SNAPGONE(oip); return (error); } diff --git a/sys/ufs/ufs/ufsmount.h b/sys/ufs/ufs/ufsmount.h index b13db40..c2cfcfb 100644 --- a/sys/ufs/ufs/ufsmount.h +++ b/sys/ufs/ufs/ufsmount.h @@ -104,6 +104,7 @@ struct ufsmount { int (*um_vfree)(struct vnode *, ino_t, int); void (*um_ifree)(struct ufsmount *, struct inode *); int (*um_rdonly)(struct inode *); + void (*um_snapgone)(struct inode *); }; #define UFS_BALLOC(aa, bb, cc, dd, ee, ff) VFSTOUFS((aa)->v_mount)->um_balloc(aa, bb, cc, dd, ee, ff) @@ -114,6 +115,7 @@ struct ufsmount { #define UFS_VFREE(aa, bb, cc) VFSTOUFS((aa)->v_mount)->um_vfree(aa, bb, cc) #define UFS_IFREE(aa, bb) ((aa)->um_ifree(aa, bb)) #define UFS_RDONLY(aa) ((aa)->i_ump->um_rdonly(aa)) +#define UFS_SNAPGONE(aa) ((aa)->i_ump->um_snapgone(aa)) #define UFS_LOCK(aa) mtx_lock(&(aa)->um_lock) #define UFS_UNLOCK(aa) mtx_unlock(&(aa)->um_lock) |