[BACK]Return to vfs_mount.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

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

Diff for /src/sys/kern/vfs_mount.c between version 1.12 and 1.12.6.2

version 1.12, 2011/11/18 21:17:45 version 1.12.6.2, 2014/12/04 05:38:54
Line 83  __KERNEL_RCSID(0, "$NetBSD$");
Line 83  __KERNEL_RCSID(0, "$NetBSD$");
 #include <sys/module.h>  #include <sys/module.h>
 #include <sys/mount.h>  #include <sys/mount.h>
 #include <sys/namei.h>  #include <sys/namei.h>
   #include <sys/extattr.h>
 #include <sys/syscallargs.h>  #include <sys/syscallargs.h>
 #include <sys/sysctl.h>  #include <sys/sysctl.h>
 #include <sys/systm.h>  #include <sys/systm.h>
Line 636  mount_checkdirs(vnode_t *olddp)
Line 637  mount_checkdirs(vnode_t *olddp)
         vput(newdp);          vput(newdp);
 }  }
   
   /*
    * Start extended attributes
    */
   static int
   start_extattr(struct mount *mp)
   {
           int error;
   
           error = VFS_EXTATTRCTL(mp, EXTATTR_CMD_START, NULL, 0, NULL);
           if (error)
                   printf("%s: failed to start extattr: error = %d\n",
                          mp->mnt_stat.f_mntonname, error);
   
           return error;
   }
   
 int  int
 mount_domount(struct lwp *l, vnode_t **vpp, struct vfsops *vfsops,  mount_domount(struct lwp *l, vnode_t **vpp, struct vfsops *vfsops,
     const char *path, int flags, void *data, size_t *data_len)      const char *path, int flags, void *data, size_t *data_len)
Line 758  mount_domount(struct lwp *l, vnode_t **v
Line 775  mount_domount(struct lwp *l, vnode_t **v
         vfs_unbusy(mp, true, NULL);          vfs_unbusy(mp, true, NULL);
         (void) VFS_STATVFS(mp, &mp->mnt_stat);          (void) VFS_STATVFS(mp, &mp->mnt_stat);
         error = VFS_START(mp, 0);          error = VFS_START(mp, 0);
         if (error)         if (error) {
                 vrele(vp);                  vrele(vp);
           } else if (flags & MNT_EXTATTR) {
                   (void)start_extattr(mp);
           }
         /* Drop reference held for VFS_START(). */          /* Drop reference held for VFS_START(). */
         vfs_destroy(mp);          vfs_destroy(mp);
         *vpp = NULL;          *vpp = NULL;
Line 794  int
Line 814  int
 dounmount(struct mount *mp, int flags, struct lwp *l)  dounmount(struct mount *mp, int flags, struct lwp *l)
 {  {
         vnode_t *coveredvp;          vnode_t *coveredvp;
         int error, async, used_syncer;          int error, async, used_syncer, used_extattr;
   
 #if NVERIEXEC > 0  #if NVERIEXEC > 0
         error = veriexec_unmountchk(mp);          error = veriexec_unmountchk(mp);
Line 815  dounmount(struct mount *mp, int flags, s
Line 835  dounmount(struct mount *mp, int flags, s
         }          }
   
         used_syncer = (mp->mnt_syncer != NULL);          used_syncer = (mp->mnt_syncer != NULL);
           used_extattr = mp->mnt_flag & MNT_EXTATTR;
   
         /*          /*
          * XXX Syncer must be frozen when we get here.  This should really           * XXX Syncer must be frozen when we get here.  This should really
Line 853  dounmount(struct mount *mp, int flags, s
Line 874  dounmount(struct mount *mp, int flags, s
                 rw_exit(&mp->mnt_unmounting);                  rw_exit(&mp->mnt_unmounting);
                 if (used_syncer)                  if (used_syncer)
                         mutex_exit(&syncer_mutex);                          mutex_exit(&syncer_mutex);
                   if (used_extattr) {
                           if (start_extattr(mp) != 0)
                                   mp->mnt_flag &= ~MNT_EXTATTR;
                           else
                                   mp->mnt_flag |= MNT_EXTATTR;
                   }
                 return (error);                  return (error);
         }          }
         vfs_scrubvnlist(mp);          vfs_scrubvnlist(mp);

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.12.6.2

CVSweb <webmaster@jp.NetBSD.org>