Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.208.2.3 retrieving revision 1.209 diff -u -p -r1.208.2.3 -r1.209 --- src/sys/ufs/ffs/ffs_vfsops.c 2008/03/23 02:05:12 1.208.2.3 +++ src/sys/ufs/ffs/ffs_vfsops.c 2007/10/08 18:01:29 1.209 @@ -1,4 +1,4 @@ -/* ffs_vfsops.c,v 1.208.2.2 2008/01/09 01:58:27 matt Exp */ +/* $NetBSD: ffs_vfsops.c,v 1.209 2007/10/08 18:01:29 ad Exp $ */ /* * Copyright (c) 1989, 1991, 1993, 1994 @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "ffs_vfsops.c,v 1.208.2.2 2008/01/09 01:58:27 matt Exp"); +__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.209 2007/10/08 18:01:29 ad Exp $"); #if defined(_KERNEL_OPT) #include "opt_ffs.h" @@ -63,7 +63,6 @@ __KERNEL_RCSID(0, "ffs_vfsops.c,v 1.208. #include #include -#include #include #include @@ -112,8 +111,6 @@ struct vfsops ffs_vfsops = { ffs_snapshot, ffs_extattrctl, ffs_suspendctl, - genfs_renamelock_enter, - genfs_renamelock_exit, ffs_vnodeopv_descs, 0, { NULL, NULL }, @@ -136,9 +133,9 @@ static const struct ufs_ops ffs_ufsops = .uo_balloc = ffs_balloc, }; -pool_cache_t ffs_inode_cache; -pool_cache_t ffs_dinode1_cache; -pool_cache_t ffs_dinode2_cache; +struct pool ffs_inode_pool; +struct pool ffs_dinode1_pool; +struct pool ffs_dinode2_pool; static void ffs_oldfscompat_read(struct fs *, struct ufsmount *, daddr_t); static void ffs_oldfscompat_write(struct fs *, struct ufsmount *); @@ -164,19 +161,20 @@ ffs_mountroot(void) return (error); } if ((error = ffs_mountfs(rootvp, mp, l)) != 0) { - vfs_unbusy(mp, false); - vfs_destroy(mp); + mp->mnt_op->vfs_refcount--; + vfs_unbusy(mp); + free(mp, M_MOUNT); return (error); } - mutex_enter(&mountlist_lock); + simple_lock(&mountlist_slock); CIRCLEQ_INSERT_TAIL(&mountlist, mp, mnt_list); - mutex_exit(&mountlist_lock); + simple_unlock(&mountlist_slock); ump = VFSTOUFS(mp); fs = ump->um_fs; memset(fs->fs_fsmnt, 0, sizeof(fs->fs_fsmnt)); (void)copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0); - (void)ffs_statvfs(mp, &mp->mnt_stat); - vfs_unbusy(mp, false); + (void)ffs_statvfs(mp, &mp->mnt_stat, l); + vfs_unbusy(mp); setrootfstime((time_t)fs->fs_time); return (0); } @@ -187,11 +185,11 @@ ffs_mountroot(void) * mount system call */ int -ffs_mount(struct mount *mp, const char *path, void *data, size_t *data_len) +ffs_mount(struct mount *mp, const char *path, void *data, size_t *data_len, + struct lwp *l) { - struct lwp *l = curlwp; struct nameidata nd; - struct vnode *vp, *devvp = NULL; + struct vnode *devvp = NULL; struct ufs_args *args = data; struct ufsmount *ump = NULL; struct fs *fs; @@ -221,7 +219,7 @@ ffs_mount(struct mount *mp, const char * /* * Look up the name and verify that it's sane. */ - NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, args->fspec); + NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, args->fspec, l); if ((error = namei(&nd)) != 0) return (error); devvp = nd.ni_vp; @@ -263,21 +261,6 @@ ffs_mount(struct mount *mp, const char * } /* - * Mark the device and any existing vnodes as involved in - * softdep processing. - */ - if ((mp->mnt_flag & MNT_SOFTDEP) != 0) { - devvp->v_uflag |= VU_SOFTDEP; - mutex_enter(&mntvnode_lock); - TAILQ_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) { - if (vp->v_mount != mp || vismarker(vp)) - continue; - vp->v_uflag |= VU_SOFTDEP; - } - mutex_exit(&mntvnode_lock); - } - - /* * If mount by non-root, then verify that user has necessary * permissions on the device. */ @@ -289,7 +272,7 @@ ffs_mount(struct mount *mp, const char * (mp->mnt_flag & MNT_RDONLY) == 0) accessmode |= VWRITE; vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_ACCESS(devvp, accessmode, l->l_cred); + error = VOP_ACCESS(devvp, accessmode, l->l_cred, l); VOP_UNLOCK(devvp, 0); } @@ -301,17 +284,30 @@ ffs_mount(struct mount *mp, const char * if (!update) { int xflags; + /* + * Disallow multiple mounts of the same device. + * Disallow mounting of a device that is currently in use + * (except for root, which might share swap device for + * miniroot). + */ + error = vfs_mountedon(devvp); + if (error) + goto fail; + if (vcount(devvp) > 1 && devvp != rootvp) { + error = EBUSY; + goto fail; + } if (mp->mnt_flag & MNT_RDONLY) xflags = FREAD; else xflags = FREAD|FWRITE; - error = VOP_OPEN(devvp, xflags, FSCRED); + error = VOP_OPEN(devvp, xflags, FSCRED, l); if (error) goto fail; error = ffs_mountfs(devvp, mp, l); if (error) { vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY); - (void)VOP_CLOSE(devvp, xflags, NOCRED); + (void)VOP_CLOSE(devvp, xflags, NOCRED, l); VOP_UNLOCK(devvp, 0); goto fail; } @@ -486,7 +482,7 @@ fail: int ffs_reload(struct mount *mp, kauth_cred_t cred, struct lwp *l) { - struct vnode *vp, *mvp, *devvp; + struct vnode *vp, *nvp, *devvp; struct inode *ip; void *space; struct buf *bp; @@ -514,7 +510,7 @@ ffs_reload(struct mount *mp, kauth_cred_ * Step 2: re-read superblock from disk. */ fs = ump->um_fs; - if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED) != 0) + if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED, l) != 0) size = DEV_BSIZE; else size = dpart.disklab->d_secsize; @@ -563,7 +559,7 @@ ffs_reload(struct mount *mp, kauth_cred_ /* First check to see if this is tagged as an Apple UFS filesystem * in the disklabel */ - if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred) == 0) && + if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, l) == 0) && (dpart.part->p_fstype == FS_APPLEUFS)) { ump->um_flags |= UFS_ISAPPLEUFS; } @@ -612,7 +608,7 @@ ffs_reload(struct mount *mp, kauth_cred_ } mutex_exit(&ump->um_lock); - ffs_statvfs(mp, &mp->mnt_stat); + ffs_statvfs(mp, &mp->mnt_stat, l); /* * Step 3: re-read summary information from disk. */ @@ -651,36 +647,30 @@ ffs_reload(struct mount *mp, kauth_cred_ *lp++ = fs->fs_contigsumsize; } - /* Allocate a marker vnode. */ - if ((mvp = vnalloc(mp)) == NULL) - return ENOMEM; +loop: /* * NOTE: not using the TAILQ_FOREACH here since in this loop vgone() * and vclean() can be called indirectly */ - mutex_enter(&mntvnode_lock); - loop: - for (vp = TAILQ_FIRST(&mp->mnt_vnodelist); vp; vp = vunmark(mvp)) { - vmark(mvp, vp); - if (vp->v_mount != mp || vismarker(vp)) - continue; + simple_lock(&mntvnode_slock); + for (vp = TAILQ_FIRST(&mp->mnt_vnodelist); vp; vp = nvp) { + if (vp->v_mount != mp) { + simple_unlock(&mntvnode_slock); + goto loop; + } /* * Step 4: invalidate all inactive vnodes. */ - if (vrecycle(vp, &mntvnode_lock, l)) { - mutex_enter(&mntvnode_lock); - (void)vunmark(mvp); + if (vrecycle(vp, &mntvnode_slock, l)) goto loop; - } /* * Step 5: invalidate all cached file data. */ - mutex_enter(&vp->v_interlock); - mutex_exit(&mntvnode_lock); - if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK)) { - (void)vunmark(mvp); + simple_lock(&vp->v_interlock); + nvp = TAILQ_NEXT(vp, v_mntvnodes); + simple_unlock(&mntvnode_slock); + if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK)) goto loop; - } if (vinvalbuf(vp, 0, cred, l, 0, 0)) panic("ffs_reload: dirty2"); /* @@ -692,18 +682,16 @@ ffs_reload(struct mount *mp, kauth_cred_ if (error) { brelse(bp, 0); vput(vp); - (void)vunmark(mvp); - break; + return (error); } ffs_load_inode(bp, ip, fs, ip->i_number); ip->i_ffs_effnlink = ip->i_nlink; brelse(bp, 0); vput(vp); - mutex_enter(&mntvnode_lock); + simple_lock(&mntvnode_slock); } - mutex_exit(&mntvnode_lock); - vnfree(mvp); - return (error); + simple_unlock(&mntvnode_slock); + return (0); } /* @@ -744,7 +732,7 @@ ffs_mountfs(struct vnode *devvp, struct return (error); ronly = (mp->mnt_flag & MNT_RDONLY) != 0; - if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred) != 0) + if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, l) != 0) size = DEV_BSIZE; else size = dpart.disklab->d_secsize; @@ -755,10 +743,6 @@ ffs_mountfs(struct vnode *devvp, struct sblockloc = 0; fstype = 0; - error = fstrans_mount(mp); - if (error) - return error; - /* * Try reading the superblock in each of its possible locations. */ @@ -869,7 +853,7 @@ ffs_mountfs(struct vnode *devvp, struct /* First check to see if this is tagged as an Apple UFS filesystem * in the disklabel */ - if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred) == 0) && + if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, l) == 0) && (dpart.part->p_fstype == FS_APPLEUFS)) { ump->um_flags |= UFS_ISAPPLEUFS; } @@ -990,7 +974,7 @@ ffs_mountfs(struct vnode *devvp, struct mp->mnt_fs_bshift = fs->fs_bshift; mp->mnt_dev_bshift = DEV_BSHIFT; /* XXX */ mp->mnt_flag |= MNT_LOCAL; - mp->mnt_iflag |= IMNT_MPSAFE; + mp->mnt_iflag |= IMNT_HAS_TRANS; #ifdef FFS_EI if (needswap) ump->um_flags |= UFS_NEEDSWAP; @@ -1032,7 +1016,6 @@ ffs_mountfs(struct vnode *devvp, struct #endif /* UFS_EXTATTR */ return (0); out: - fstrans_unmount(mp); if (fs) free(fs, M_UFSMNT); devvp->v_specmountpoint = NULL; @@ -1167,9 +1150,8 @@ ffs_oldfscompat_write(struct fs *fs, str * unmount system call */ int -ffs_unmount(struct mount *mp, int mntflags) +ffs_unmount(struct mount *mp, int mntflags, struct lwp *l) { - struct lwp *l = curlwp; struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs = ump->um_fs; int error, flags, penderr; @@ -1180,8 +1162,13 @@ ffs_unmount(struct mount *mp, int mntfla flags |= FORCECLOSE; #ifdef UFS_EXTATTR if (ump->um_fstype == UFS1) { - ufs_extattr_stop(mp, l); - ufs_extattr_uepm_destroy(&ump->um_extattr); + error = ufs_extattr_stop(mp, l); + if (error) { + if (error != EOPNOTSUPP) + printf("%s: ufs_extattr_stop returned %d\n", + fs->fs_fsmnt, error); + } else + ufs_extattr_uepm_destroy(&ump->um_extattr); } #endif /* UFS_EXTATTR */ if (mp->mnt_flag & MNT_SOFTDEP) { @@ -1220,18 +1207,16 @@ ffs_unmount(struct mount *mp, int mntfla ump->um_devvp->v_specmountpoint = NULL; vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); (void)VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE, - NOCRED); + NOCRED, l); vput(ump->um_devvp); free(fs->fs_csp, M_UFSMNT); free(fs, M_UFSMNT); if (ump->um_oldfscompat != NULL) free(ump->um_oldfscompat, M_UFSMNT); - softdep_unmount(mp); mutex_destroy(&ump->um_lock); free(ump, M_UFSMNT); mp->mnt_data = NULL; mp->mnt_flag &= ~MNT_LOCAL; - fstrans_unmount(mp); return (0); } @@ -1277,7 +1262,7 @@ ffs_flushfiles(struct mount *mp, int fla * Flush filesystem metadata. */ vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); - error = VOP_FSYNC(ump->um_devvp, l->l_cred, FSYNC_WAIT, 0, 0); + error = VOP_FSYNC(ump->um_devvp, l->l_cred, FSYNC_WAIT, 0, 0, l); VOP_UNLOCK(ump->um_devvp, 0); return (error); } @@ -1286,7 +1271,7 @@ ffs_flushfiles(struct mount *mp, int fla * Get file system statistics. */ int -ffs_statvfs(struct mount *mp, struct statvfs *sbp) +ffs_statvfs(struct mount *mp, struct statvfs *sbp, struct lwp *l) { struct ufsmount *ump; struct fs *fs; @@ -1324,10 +1309,9 @@ ffs_statvfs(struct mount *mp, struct sta * Note: we are always called with the filesystem marked `MPBUSY'. */ int -ffs_sync(struct mount *mp, int waitfor, kauth_cred_t cred) +ffs_sync(struct mount *mp, int waitfor, kauth_cred_t cred, struct lwp *l) { - struct lwp *l = curlwp; - struct vnode *vp, *mvp; + struct vnode *vp, *nvp; struct inode *ip; struct ufsmount *ump = VFSTOUFS(mp); struct fs *fs; @@ -1338,66 +1322,59 @@ ffs_sync(struct mount *mp, int waitfor, printf("fs = %s\n", fs->fs_fsmnt); panic("update: rofs mod"); } - - /* Allocate a marker vnode. */ - if ((mvp = vnalloc(mp)) == NULL) - return (ENOMEM); - fstrans_start(mp, FSTRANS_SHARED); /* * Write back each (modified) inode. */ - mutex_enter(&mntvnode_lock); + simple_lock(&mntvnode_slock); loop: /* * NOTE: not using the TAILQ_FOREACH here since in this loop vgone() * and vclean() can be called indirectly */ - for (vp = TAILQ_FIRST(&mp->mnt_vnodelist); vp; vp = vunmark(mvp)) { - vmark(mvp, vp); + for (vp = TAILQ_FIRST(&mp->mnt_vnodelist); vp; vp = nvp) { /* * If the vnode that we are about to sync is no longer * associated with this mount point, start over. */ - if (vp->v_mount != mp || vismarker(vp)) - continue; - mutex_enter(&vp->v_interlock); + if (vp->v_mount != mp) + goto loop; + simple_lock(&vp->v_interlock); + nvp = TAILQ_NEXT(vp, v_mntvnodes); ip = VTOI(vp); - if (ip == NULL || (vp->v_iflag & (VI_XLOCK|VI_CLEAN)) != 0 || - vp->v_type == VNON || ((ip->i_flag & - (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) == 0 && - LIST_EMPTY(&vp->v_dirtyblkhd) && - UVM_OBJ_IS_CLEAN(&vp->v_uobj))) + if (vp->v_type == VNON || + ((ip->i_flag & + (IN_CHANGE | IN_UPDATE | IN_MODIFIED)) == 0 && + LIST_EMPTY(&vp->v_dirtyblkhd) && + UVM_OBJ_IS_CLEAN(&vp->v_uobj))) { - mutex_exit(&vp->v_interlock); + simple_unlock(&vp->v_interlock); continue; } if (vp->v_type == VBLK && fstrans_getstate(mp) == FSTRANS_SUSPENDING) { - mutex_exit(&vp->v_interlock); + simple_unlock(&vp->v_interlock); continue; } - mutex_exit(&mntvnode_lock); + simple_unlock(&mntvnode_slock); error = vget(vp, LK_EXCLUSIVE | LK_NOWAIT | LK_INTERLOCK); if (error) { - mutex_enter(&mntvnode_lock); - if (error == ENOENT) { - (void)vunmark(mvp); + simple_lock(&mntvnode_slock); + if (error == ENOENT) goto loop; - } continue; } if (vp->v_type == VREG && waitfor == MNT_LAZY) error = ffs_update(vp, NULL, NULL, 0); else error = VOP_FSYNC(vp, cred, - waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0); + waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0, l); if (error) allerror = error; vput(vp); - mutex_enter(&mntvnode_lock); + simple_lock(&mntvnode_slock); } - mutex_exit(&mntvnode_lock); + simple_unlock(&mntvnode_slock); /* * Force stale file system control information to be flushed. */ @@ -1406,7 +1383,7 @@ loop: allerror = error; /* Flushed work items may create new vnodes to clean */ if (allerror == 0 && count) { - mutex_enter(&mntvnode_lock); + simple_lock(&mntvnode_slock); goto loop; } } @@ -1414,11 +1391,11 @@ loop: !LIST_EMPTY(&ump->um_devvp->v_dirtyblkhd))) { vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY); if ((error = VOP_FSYNC(ump->um_devvp, cred, - waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0)) != 0) + waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0, l)) != 0) allerror = error; VOP_UNLOCK(ump->um_devvp, 0); if (allerror == 0 && waitfor == MNT_WAIT) { - mutex_enter(&mntvnode_lock); + simple_lock(&mntvnode_slock); goto loop; } } @@ -1435,7 +1412,6 @@ loop: allerror = error; } fstrans_done(mp); - vnfree(mvp); return (allerror); } @@ -1468,7 +1444,7 @@ ffs_vget(struct mount *mp, ino_t ino, st *vpp = NULL; return (error); } - ip = pool_cache_get(ffs_inode_cache, PR_WAITOK); + ip = pool_get(&ffs_inode_pool, PR_WAITOK); /* * If someone beat us to it, put back the freshly allocated @@ -1478,13 +1454,11 @@ ffs_vget(struct mount *mp, ino_t ino, st if (ufs_ihashget(dev, ino, 0) != NULL) { mutex_exit(&ufs_hashlock); ungetnewvnode(vp); - pool_cache_put(ffs_inode_cache, ip); + pool_put(&ffs_inode_pool, ip); goto retry; } - vp->v_vflag |= VV_LOCKSWORK; - if ((mp->mnt_flag & MNT_SOFTDEP) != 0) - vp->v_uflag |= VU_SOFTDEP; + vp->v_flag |= VLOCKSWORK; /* * XXX MFS ends up here, too, to allocate an inode. Should we @@ -1504,12 +1478,6 @@ ffs_vget(struct mount *mp, ino_t ino, st #endif /* - * Initialize genfs node, we might proceed to destroy it in - * error branches. - */ - genfs_node_init(vp, &ffs_genfsops); - - /* * Put it onto its hash chain and lock it so that other requests for * this inode will block if they arrive while we are sleeping waiting * for old data structures to be purged or for the contents of the @@ -1537,11 +1505,9 @@ ffs_vget(struct mount *mp, ino_t ino, st return (error); } if (ip->i_ump->um_fstype == UFS1) - ip->i_din.ffs1_din = pool_cache_get(ffs_dinode1_cache, - PR_WAITOK); + ip->i_din.ffs1_din = pool_get(&ffs_dinode1_pool, PR_WAITOK); else - ip->i_din.ffs2_din = pool_cache_get(ffs_dinode2_cache, - PR_WAITOK); + ip->i_din.ffs2_din = pool_get(&ffs_dinode2_pool, PR_WAITOK); ffs_load_inode(bp, ip, fs, ino); if (DOINGSOFTDEP(vp)) softdep_load_inodeblock(ip); @@ -1560,6 +1526,7 @@ ffs_vget(struct mount *mp, ino_t ino, st * Finish inode initialization now that aliasing has been resolved. */ + genfs_node_init(vp, &ffs_genfsops); ip->i_devvp = ump->um_devvp; VREF(ip->i_devvp); @@ -1634,12 +1601,12 @@ ffs_init(void) if (ffs_initcount++ > 0) return; - ffs_inode_cache = pool_cache_init(sizeof(struct inode), 0, 0, 0, - "ffsino", NULL, IPL_NONE, NULL, NULL, NULL); - ffs_dinode1_cache = pool_cache_init(sizeof(struct ufs1_dinode), 0, 0, 0, - "ffsdino1", NULL, IPL_NONE, NULL, NULL, NULL); - ffs_dinode2_cache = pool_cache_init(sizeof(struct ufs2_dinode), 0, 0, 0, - "ffsdino2", NULL, IPL_NONE, NULL, NULL, NULL); + pool_init(&ffs_inode_pool, sizeof(struct inode), 0, 0, 0, + "ffsinopl", &pool_allocator_nointr, IPL_NONE); + pool_init(&ffs_dinode1_pool, sizeof(struct ufs1_dinode), 0, 0, 0, + "dino1pl", &pool_allocator_nointr, IPL_NONE); + pool_init(&ffs_dinode2_pool, sizeof(struct ufs2_dinode), 0, 0, 0, + "dino2pl", &pool_allocator_nointr, IPL_NONE); softdep_initialize(); ffs_snapshot_init(); ufs_init(); @@ -1661,9 +1628,9 @@ ffs_done(void) /* XXX softdep cleanup ? */ ffs_snapshot_fini(); ufs_done(); - pool_cache_destroy(ffs_dinode2_cache); - pool_cache_destroy(ffs_dinode1_cache); - pool_cache_destroy(ffs_inode_cache); + pool_destroy(&ffs_dinode2_pool); + pool_destroy(&ffs_dinode1_pool); + pool_destroy(&ffs_inode_pool); } SYSCTL_SETUP(sysctl_vfs_ffs_setup, "sysctl vfs.ffs subtree setup") @@ -1790,7 +1757,7 @@ ffs_cgupdate(struct ufsmount *mp, int wa int ffs_extattrctl(struct mount *mp, int cmd, struct vnode *vp, - int attrnamespace, const char *attrname) + int attrnamespace, const char *attrname, struct lwp *l) { #ifdef UFS_EXTATTR /* @@ -1798,9 +1765,10 @@ ffs_extattrctl(struct mount *mp, int cmd * UFS2 has native extended attributes. */ if (VFSTOUFS(mp)->um_fstype == UFS1) - return (ufs_extattrctl(mp, cmd, vp, attrnamespace, attrname)); + return (ufs_extattrctl(mp, cmd, vp, attrnamespace, attrname, + l)); #endif - return (vfs_stdextattrctl(mp, cmd, vp, attrnamespace, attrname)); + return (vfs_stdextattrctl(mp, cmd, vp, attrnamespace, attrname, l)); } int @@ -1813,7 +1781,7 @@ ffs_suspendctl(struct mount *mp, int cmd case SUSPEND_SUSPEND: if ((error = fstrans_setstate(mp, FSTRANS_SUSPENDING)) != 0) return error; - error = ffs_sync(mp, MNT_WAIT, l->l_proc->p_cred); + error = ffs_sync(mp, MNT_WAIT, l->l_proc->p_cred, l); if (error == 0) error = fstrans_setstate(mp, FSTRANS_SUSPENDED); if (error != 0) {