[BACK]Return to ffs_vfsops.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / ufs / ffs

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/ufs/ffs/ffs_vfsops.c between version 1.118.2.5 and 1.118.2.6

version 1.118.2.5, 2004/09/18 14:56:52 version 1.118.2.6, 2004/09/21 13:39:09
Line 137  ffs_mountroot()
Line 137  ffs_mountroot()
 {  {
         struct fs *fs;          struct fs *fs;
         struct mount *mp;          struct mount *mp;
         struct proc *p = curproc;       /* XXX */          struct lwp *l = curlwp;                 /* XXX */
         struct ufsmount *ump;          struct ufsmount *ump;
         int error;          int error;
   
Line 154  ffs_mountroot()
Line 154  ffs_mountroot()
                 vrele(rootvp);                  vrele(rootvp);
                 return (error);                  return (error);
         }          }
         if ((error = ffs_mountfs(rootvp, mp, p)) != 0) {          if ((error = ffs_mountfs(rootvp, mp, l)) != 0) {
                 mp->mnt_op->vfs_refcount--;                  mp->mnt_op->vfs_refcount--;
                 vfs_unbusy(mp);                  vfs_unbusy(mp);
                 free(mp, M_MOUNT);                  free(mp, M_MOUNT);
Line 168  ffs_mountroot()
Line 168  ffs_mountroot()
         fs = ump->um_fs;          fs = ump->um_fs;
         memset(fs->fs_fsmnt, 0, sizeof(fs->fs_fsmnt));          memset(fs->fs_fsmnt, 0, sizeof(fs->fs_fsmnt));
         (void)copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0);          (void)copystr(mp->mnt_stat.f_mntonname, fs->fs_fsmnt, MNAMELEN - 1, 0);
         (void)ffs_statvfs(mp, &mp->mnt_stat, p);          (void)ffs_statvfs(mp, &mp->mnt_stat, l);
         vfs_unbusy(mp);          vfs_unbusy(mp);
         setrootfstime((time_t)fs->fs_time);          setrootfstime((time_t)fs->fs_time);
         return (0);          return (0);
Line 180  ffs_mountroot()
Line 180  ffs_mountroot()
  * mount system call   * mount system call
  */   */
 int  int
 ffs_mount(mp, path, data, ndp, p)  ffs_mount(mp, path, data, ndp, l)
         struct mount *mp;          struct mount *mp;
         const char *path;          const char *path;
         void *data;          void *data;
         struct nameidata *ndp;          struct nameidata *ndp;
         struct proc *p;          struct lwp *l;
 {  {
         struct vnode *devvp = NULL;          struct vnode *devvp = NULL;
         struct ufs_args args;          struct ufs_args args;
         struct ufsmount *ump = NULL;          struct ufsmount *ump = NULL;
           struct proc *p;
         struct fs *fs;          struct fs *fs;
         int error, flags, update;          int error, flags, update;
         mode_t accessmode;          mode_t accessmode;
   
           p = l->l_proc;
         if (mp->mnt_flag & MNT_GETARGS) {          if (mp->mnt_flag & MNT_GETARGS) {
                 ump = VFSTOUFS(mp);                  ump = VFSTOUFS(mp);
                 if (ump == NULL)                  if (ump == NULL)
Line 229  ffs_mount(mp, path, data, ndp, p)
Line 231  ffs_mount(mp, path, data, ndp, p)
                 /*                  /*
                  * Look up the name and verify that it's sane.                   * Look up the name and verify that it's sane.
                  */                   */
                 NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, p);                  NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, l);
                 if ((error = namei(ndp)) != 0)                  if ((error = namei(ndp)) != 0)
                         return (error);                          return (error);
                 devvp = ndp->ni_vp;                  devvp = ndp->ni_vp;
Line 263  ffs_mount(mp, path, data, ndp, p)
Line 265  ffs_mount(mp, path, data, ndp, p)
                     (mp->mnt_flag & MNT_RDONLY) == 0)                      (mp->mnt_flag & MNT_RDONLY) == 0)
                         accessmode |= VWRITE;                          accessmode |= VWRITE;
                 vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);                  vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
                 error = VOP_ACCESS(devvp, accessmode, p->p_ucred, p);                  error = VOP_ACCESS(devvp, accessmode, p->p_ucred, l);
                 VOP_UNLOCK(devvp, 0);                  VOP_UNLOCK(devvp, 0);
         }          }
   
Line 273  ffs_mount(mp, path, data, ndp, p)
Line 275  ffs_mount(mp, path, data, ndp, p)
         }          }
   
         if (!update) {          if (!update) {
                 error = ffs_mountfs(devvp, mp, p);                  error = ffs_mountfs(devvp, mp, l);
                 if (error) {                  if (error) {
                         vrele(devvp);                          vrele(devvp);
                         return (error);                          return (error);
Line 310  ffs_mount(mp, path, data, ndp, p)
Line 312  ffs_mount(mp, path, data, ndp, p)
                         if (mp->mnt_flag & MNT_FORCE)                          if (mp->mnt_flag & MNT_FORCE)
                                 flags |= FORCECLOSE;                                  flags |= FORCECLOSE;
                         if (mp->mnt_flag & MNT_SOFTDEP)                          if (mp->mnt_flag & MNT_SOFTDEP)
                                 error = softdep_flushfiles(mp, flags, p);                                  error = softdep_flushfiles(mp, flags, l);
                         else                          else
                                 error = ffs_flushfiles(mp, flags, p);                                  error = ffs_flushfiles(mp, flags, l);
                         if (fs->fs_pendingblocks != 0 ||                          if (fs->fs_pendingblocks != 0 ||
                             fs->fs_pendinginodes != 0) {                              fs->fs_pendinginodes != 0) {
                                 printf("%s: update error: blocks %" PRId64                                  printf("%s: update error: blocks %" PRId64
Line 349  ffs_mount(mp, path, data, ndp, p)
Line 351  ffs_mount(mp, path, data, ndp, p)
                         flags = WRITECLOSE;                          flags = WRITECLOSE;
                         if (mp->mnt_flag & MNT_FORCE)                          if (mp->mnt_flag & MNT_FORCE)
                                 flags |= FORCECLOSE;                                  flags |= FORCECLOSE;
                         error = softdep_flushfiles(mp, flags, p);                          error = softdep_flushfiles(mp, flags, l);
                         if (error == 0 && ffs_cgupdate(ump, MNT_WAIT) == 0)                          if (error == 0 && ffs_cgupdate(ump, MNT_WAIT) == 0)
                                 fs->fs_flags &= ~FS_DOSOFTDEP;                                  fs->fs_flags &= ~FS_DOSOFTDEP;
                                 (void) ffs_sbupdate(ump, MNT_WAIT);                                  (void) ffs_sbupdate(ump, MNT_WAIT);
Line 370  ffs_mount(mp, path, data, ndp, p)
Line 372  ffs_mount(mp, path, data, ndp, p)
                         flags = WRITECLOSE;                          flags = WRITECLOSE;
                         if (mp->mnt_flag & MNT_FORCE)                          if (mp->mnt_flag & MNT_FORCE)
                                 flags |= FORCECLOSE;                                  flags |= FORCECLOSE;
                         error = ffs_flushfiles(mp, flags, p);                          error = ffs_flushfiles(mp, flags, l);
                         vn_finished_write(mp);                          vn_finished_write(mp);
 #else  #else
                         mp->mnt_flag &= ~MNT_SOFTDEP;                          mp->mnt_flag &= ~MNT_SOFTDEP;
Line 378  ffs_mount(mp, path, data, ndp, p)
Line 380  ffs_mount(mp, path, data, ndp, p)
                 }                  }
   
                 if (mp->mnt_flag & MNT_RELOAD) {                  if (mp->mnt_flag & MNT_RELOAD) {
                         error = ffs_reload(mp, p->p_ucred, p);                          error = ffs_reload(mp, p->p_ucred, l);
                         if (error)                          if (error)
                                 return (error);                                  return (error);
                 }                  }
Line 414  ffs_mount(mp, path, data, ndp, p)
Line 416  ffs_mount(mp, path, data, ndp, p)
         }          }
   
         error = set_statvfs_info(path, UIO_USERSPACE, args.fspec,          error = set_statvfs_info(path, UIO_USERSPACE, args.fspec,
             UIO_USERSPACE, mp, p);              UIO_USERSPACE, mp, l);
         if (error == 0)          if (error == 0)
                 (void)strncpy(fs->fs_fsmnt, mp->mnt_stat.f_mntonname,                  (void)strncpy(fs->fs_fsmnt, mp->mnt_stat.f_mntonname,
                     sizeof(fs->fs_fsmnt));                      sizeof(fs->fs_fsmnt));
Line 452  ffs_mount(mp, path, data, ndp, p)
Line 454  ffs_mount(mp, path, data, ndp, p)
  *      6) re-read inode data for all active vnodes.   *      6) re-read inode data for all active vnodes.
  */   */
 int  int
 ffs_reload(mp, cred, p)  ffs_reload(mp, cred, l)
         struct mount *mp;          struct mount *mp;
         struct ucred *cred;          struct ucred *cred;
         struct proc *p;          struct lwp *l;
 {  {
         struct vnode *vp, *nvp, *devvp;          struct vnode *vp, *nvp, *devvp;
         struct inode *ip;          struct inode *ip;
Line 477  ffs_reload(mp, cred, p)
Line 479  ffs_reload(mp, cred, p)
          */           */
         devvp = ump->um_devvp;          devvp = ump->um_devvp;
         vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);          vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
         error = vinvalbuf(devvp, 0, cred, p, 0, 0);          error = vinvalbuf(devvp, 0, cred, l, 0, 0);
         VOP_UNLOCK(devvp, 0);          VOP_UNLOCK(devvp, 0);
         if (error)          if (error)
                 panic("ffs_reload: dirty1");                  panic("ffs_reload: dirty1");
Line 485  ffs_reload(mp, cred, p)
Line 487  ffs_reload(mp, cred, p)
          * Step 2: re-read superblock from disk.           * Step 2: re-read superblock from disk.
          */           */
         fs = ump->um_fs;          fs = ump->um_fs;
         if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED, p) != 0)          if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, NOCRED, l) != 0)
                 size = DEV_BSIZE;                  size = DEV_BSIZE;
         else          else
                 size = dpart.disklab->d_secsize;                  size = dpart.disklab->d_secsize;
Line 534  ffs_reload(mp, cred, p)
Line 536  ffs_reload(mp, cred, p)
         /* First check to see if this is tagged as an Apple UFS filesystem          /* First check to see if this is tagged as an Apple UFS filesystem
          * in the disklabel           * in the disklabel
          */           */
         if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) == 0) &&          if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, l) == 0) &&
                 (dpart.part->p_fstype == FS_APPLEUFS)) {                  (dpart.part->p_fstype == FS_APPLEUFS)) {
                 ump->um_flags |= UFS_ISAPPLEUFS;                  ump->um_flags |= UFS_ISAPPLEUFS;
         }          }
Line 581  ffs_reload(mp, cred, p)
Line 583  ffs_reload(mp, cred, p)
                 fs->fs_pendinginodes = 0;                  fs->fs_pendinginodes = 0;
         }          }
   
         ffs_statvfs(mp, &mp->mnt_stat, p);          ffs_statvfs(mp, &mp->mnt_stat, l);
         /*          /*
          * Step 3: re-read summary information from disk.           * Step 3: re-read summary information from disk.
          */           */
Line 631  loop:
Line 633  loop:
                 /*                  /*
                  * Step 4: invalidate all inactive vnodes.                   * Step 4: invalidate all inactive vnodes.
                  */                   */
                 if (vrecycle(vp, &mntvnode_slock, p))                  if (vrecycle(vp, &mntvnode_slock, l))
                         goto loop;                          goto loop;
                 /*                  /*
                  * Step 5: invalidate all cached file data.                   * Step 5: invalidate all cached file data.
Line 640  loop:
Line 642  loop:
                 simple_unlock(&mntvnode_slock);                  simple_unlock(&mntvnode_slock);
                 if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK))                  if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK))
                         goto loop;                          goto loop;
                 if (vinvalbuf(vp, 0, cred, p, 0, 0))                  if (vinvalbuf(vp, 0, cred, l, 0, 0))
                         panic("ffs_reload: dirty2");                          panic("ffs_reload: dirty2");
                 /*                  /*
                  * Step 6: re-read inode data for all active vnodes.                   * Step 6: re-read inode data for all active vnodes.
Line 672  static const int sblock_try[] = SBLOCKSE
Line 674  static const int sblock_try[] = SBLOCKSE
  * Common code for mount and mountroot   * Common code for mount and mountroot
  */   */
 int  int
 ffs_mountfs(devvp, mp, p)  ffs_mountfs(devvp, mp, l)
         struct vnode *devvp;          struct vnode *devvp;
         struct mount *mp;          struct mount *mp;
         struct proc *p;          struct lwp *l;
 {  {
         struct ufsmount *ump;          struct ufsmount *ump;
         struct buf *bp;          struct buf *bp;
Line 683  ffs_mountfs(devvp, mp, p)
Line 685  ffs_mountfs(devvp, mp, p)
         dev_t dev;          dev_t dev;
         struct partinfo dpart;          struct partinfo dpart;
         void *space;          void *space;
           struct proc *p;
         daddr_t sblockloc, fsblockloc;          daddr_t sblockloc, fsblockloc;
         int blks, fstype;          int blks, fstype;
         int error, i, size, ronly;          int error, i, size, ronly;
Line 694  ffs_mountfs(devvp, mp, p)
Line 697  ffs_mountfs(devvp, mp, p)
         u_int32_t sbsize = 8192;        /* keep gcc happy*/          u_int32_t sbsize = 8192;        /* keep gcc happy*/
   
         dev = devvp->v_rdev;          dev = devvp->v_rdev;
           p = l ? l->l_proc : NULL;
         cred = p ? p->p_ucred : NOCRED;          cred = p ? p->p_ucred : NOCRED;
         /*          /*
          * Disallow multiple mounts of the same device.           * Disallow multiple mounts of the same device.
Line 706  ffs_mountfs(devvp, mp, p)
Line 710  ffs_mountfs(devvp, mp, p)
         if (vcount(devvp) > 1 && devvp != rootvp)          if (vcount(devvp) > 1 && devvp != rootvp)
                 return (EBUSY);                  return (EBUSY);
         vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);          vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
         error = vinvalbuf(devvp, V_SAVE, cred, p, 0, 0);          error = vinvalbuf(devvp, V_SAVE, cred, l, 0, 0);
         VOP_UNLOCK(devvp, 0);          VOP_UNLOCK(devvp, 0);
         if (error)          if (error)
                 return (error);                  return (error);
   
         ronly = (mp->mnt_flag & MNT_RDONLY) != 0;          ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
         error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, p);          error = VOP_OPEN(devvp, ronly ? FREAD : FREAD|FWRITE, FSCRED, l);
         if (error)          if (error)
                 return (error);                  return (error);
         if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) != 0)          if (VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, l) != 0)
                 size = DEV_BSIZE;                  size = DEV_BSIZE;
         else          else
                 size = dpart.disklab->d_secsize;                  size = dpart.disklab->d_secsize;
Line 832  ffs_mountfs(devvp, mp, p)
Line 836  ffs_mountfs(devvp, mp, p)
         /* First check to see if this is tagged as an Apple UFS filesystem          /* First check to see if this is tagged as an Apple UFS filesystem
          * in the disklabel           * in the disklabel
          */           */
         if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, p) == 0) &&          if ((VOP_IOCTL(devvp, DIOCGPART, &dpart, FREAD, cred, l) == 0) &&
                 (dpart.part->p_fstype == FS_APPLEUFS)) {                  (dpart.part->p_fstype == FS_APPLEUFS)) {
                 ump->um_flags |= UFS_ISAPPLEUFS;                  ump->um_flags |= UFS_ISAPPLEUFS;
         }          }
Line 983  out:
Line 987  out:
         if (bp)          if (bp)
                 brelse(bp);                  brelse(bp);
         vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);          vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
         (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, p);          (void)VOP_CLOSE(devvp, ronly ? FREAD : FREAD|FWRITE, cred, l);
         VOP_UNLOCK(devvp, 0);          VOP_UNLOCK(devvp, 0);
         if (ump) {          if (ump) {
                 if (ump->um_oldfscompat)                  if (ump->um_oldfscompat)
Line 1118  ffs_oldfscompat_write(fs, ump)
Line 1122  ffs_oldfscompat_write(fs, ump)
  * unmount system call   * unmount system call
  */   */
 int  int
 ffs_unmount(mp, mntflags, p)  ffs_unmount(mp, mntflags, l)
         struct mount *mp;          struct mount *mp;
         int mntflags;          int mntflags;
         struct proc *p;          struct lwp *l;
 {  {
         struct ufsmount *ump;          struct ufsmount *ump;
         struct fs *fs;          struct fs *fs;
Line 1132  ffs_unmount(mp, mntflags, p)
Line 1136  ffs_unmount(mp, mntflags, p)
         if (mntflags & MNT_FORCE)          if (mntflags & MNT_FORCE)
                 flags |= FORCECLOSE;                  flags |= FORCECLOSE;
         if (mp->mnt_flag & MNT_SOFTDEP) {          if (mp->mnt_flag & MNT_SOFTDEP) {
                 if ((error = softdep_flushfiles(mp, flags, p)) != 0)                  if ((error = softdep_flushfiles(mp, flags, l)) != 0)
                         return (error);                          return (error);
         } else {          } else {
                 if ((error = ffs_flushfiles(mp, flags, p)) != 0)                  if ((error = ffs_flushfiles(mp, flags, l)) != 0)
                         return (error);                          return (error);
         }          }
         ump = VFSTOUFS(mp);          ump = VFSTOUFS(mp);
Line 1167  ffs_unmount(mp, mntflags, p)
Line 1171  ffs_unmount(mp, mntflags, p)
                 ump->um_devvp->v_specmountpoint = NULL;                  ump->um_devvp->v_specmountpoint = NULL;
         vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);          vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
         (void)VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,          (void)VOP_CLOSE(ump->um_devvp, fs->fs_ronly ? FREAD : FREAD|FWRITE,
                 NOCRED, p);                  NOCRED, l);
         vput(ump->um_devvp);          vput(ump->um_devvp);
         free(fs->fs_csp, M_UFSMNT);          free(fs->fs_csp, M_UFSMNT);
         free(fs, M_UFSMNT);          free(fs, M_UFSMNT);
Line 1183  ffs_unmount(mp, mntflags, p)
Line 1187  ffs_unmount(mp, mntflags, p)
  * Flush out all the files in a filesystem.   * Flush out all the files in a filesystem.
  */   */
 int  int
 ffs_flushfiles(mp, flags, p)  ffs_flushfiles(mp, flags, l)
         struct mount *mp;          struct mount *mp;
         int flags;          int flags;
         struct proc *p;          struct lwp *l;
 {  {
         extern int doforce;          extern int doforce;
         struct ufsmount *ump;          struct ufsmount *ump;
Line 1203  ffs_flushfiles(mp, flags, p)
Line 1207  ffs_flushfiles(mp, flags, p)
                 for (i = 0; i < MAXQUOTAS; i++) {                  for (i = 0; i < MAXQUOTAS; i++) {
                         if (ump->um_quotas[i] == NULLVP)                          if (ump->um_quotas[i] == NULLVP)
                                 continue;                                  continue;
                         quotaoff(p, mp, i);                          quotaoff(l, mp, i);
                 }                  }
                 /*                  /*
                  * Here we fall through to vflush again to ensure                   * Here we fall through to vflush again to ensure
Line 1224  ffs_flushfiles(mp, flags, p)
Line 1228  ffs_flushfiles(mp, flags, p)
          * Flush filesystem metadata.           * Flush filesystem metadata.
          */           */
         vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);          vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
         error = VOP_FSYNC(ump->um_devvp, p->p_ucred, FSYNC_WAIT, 0, 0, p);          error = VOP_FSYNC(ump->um_devvp, l->l_proc->p_ucred, FSYNC_WAIT, 0, 0, l);
         VOP_UNLOCK(ump->um_devvp, 0);          VOP_UNLOCK(ump->um_devvp, 0);
         return (error);          return (error);
 }  }
Line 1233  ffs_flushfiles(mp, flags, p)
Line 1237  ffs_flushfiles(mp, flags, p)
  * Get file system statistics.   * Get file system statistics.
  */   */
 int  int
 ffs_statvfs(mp, sbp, p)  ffs_statvfs(mp, sbp, l)
         struct mount *mp;          struct mount *mp;
         struct statvfs *sbp;          struct statvfs *sbp;
         struct proc *p;          struct lwp *l;
 {  {
         struct ufsmount *ump;          struct ufsmount *ump;
         struct fs *fs;          struct fs *fs;
Line 1271  ffs_statvfs(mp, sbp, p)
Line 1275  ffs_statvfs(mp, sbp, p)
  * Note: we are always called with the filesystem marked `MPBUSY'.   * Note: we are always called with the filesystem marked `MPBUSY'.
  */   */
 int  int
 ffs_sync(mp, waitfor, cred, p)  ffs_sync(mp, waitfor, cred, l)
         struct mount *mp;          struct mount *mp;
         int waitfor;          int waitfor;
         struct ucred *cred;          struct ucred *cred;
         struct proc *p;          struct lwp *l;
 {  {
         struct vnode *vp, *nvp;          struct vnode *vp, *nvp;
         struct inode *ip;          struct inode *ip;
Line 1324  loop:
Line 1328  loop:
                         error = VOP_UPDATE(vp, NULL, NULL, 0);                          error = VOP_UPDATE(vp, NULL, NULL, 0);
                 else                  else
                         error = VOP_FSYNC(vp, cred,                          error = VOP_FSYNC(vp, cred,
                             waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0, p);                              waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0, l);
                 if (error)                  if (error)
                         allerror = error;                          allerror = error;
                 vput(vp);                  vput(vp);
Line 1335  loop:
Line 1339  loop:
          * Force stale file system control information to be flushed.           * Force stale file system control information to be flushed.
          */           */
         if (waitfor == MNT_WAIT && (ump->um_mountp->mnt_flag & MNT_SOFTDEP)) {          if (waitfor == MNT_WAIT && (ump->um_mountp->mnt_flag & MNT_SOFTDEP)) {
                 if ((error = softdep_flushworklist(ump->um_mountp, &count, p)))                  if ((error = softdep_flushworklist(ump->um_mountp, &count, l)))
                         allerror = error;                          allerror = error;
                 /* Flushed work items may create new vnodes to clean */                  /* Flushed work items may create new vnodes to clean */
                 if (allerror == 0 && count) {                  if (allerror == 0 && count) {
Line 1347  loop:
Line 1351  loop:
             !LIST_EMPTY(&ump->um_devvp->v_dirtyblkhd))) {              !LIST_EMPTY(&ump->um_devvp->v_dirtyblkhd))) {
                 vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);                  vn_lock(ump->um_devvp, LK_EXCLUSIVE | LK_RETRY);
                 if ((error = VOP_FSYNC(ump->um_devvp, cred,                  if ((error = VOP_FSYNC(ump->um_devvp, cred,
                     waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0, p)) != 0)                      waitfor == MNT_WAIT ? FSYNC_WAIT : 0, 0, 0, l)) != 0)
                         allerror = error;                          allerror = error;
                 VOP_UNLOCK(ump->um_devvp, 0);                  VOP_UNLOCK(ump->um_devvp, 0);
                 if (allerror == 0 && waitfor == MNT_WAIT) {                  if (allerror == 0 && waitfor == MNT_WAIT) {
Line 1356  loop:
Line 1360  loop:
                 }                  }
         }          }
 #ifdef QUOTA  #ifdef QUOTA
         qsync(mp);          qsync(l, mp);
 #endif  #endif
         /*          /*
          * Write back modified superblock.           * Write back modified superblock.

Legend:
Removed from v.1.118.2.5  
changed lines
  Added in v.1.118.2.6

CVSweb <webmaster@jp.NetBSD.org>