Linux 3.9 compat: Undefine GCC_VERSION
[zfs.git] / module / zfs / zfs_ctldir.c
index a667340..4fa530b 100644 (file)
@@ -197,6 +197,7 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, uint64_t id,
        zp->z_is_mapped = B_FALSE;
        zp->z_is_ctldir = B_TRUE;
        zp->z_is_sa = B_FALSE;
+       zp->z_is_stale = B_FALSE;
        ip->i_ino = id;
        ip->i_mode = (S_IFDIR | S_IRUGO | S_IXUGO);
        ip->i_uid = 0;
@@ -442,7 +443,7 @@ zfsctl_snapdir_lookup(struct inode *dip, char *name, struct inode **ipp,
 
        ZFS_ENTER(zsb);
 
-       error = dmu_snapshot_id(zsb->z_os, name, &id);
+       error = dmu_snapshot_lookup(zsb->z_os, name, &id);
        if (error) {
                ZFS_EXIT(zsb);
                return (error);
@@ -685,7 +686,7 @@ zfsctl_snapdir_inactive(struct inode *ip)
        "exec 0</dev/null " \
        "     1>/dev/null " \
        "     2>/dev/null; " \
-       "umount -t zfs -n '%s%s'"
+       "umount -t zfs -n %s'%s'"
 
 static int
 __zfsctl_unmount_snapshot(zfs_snapentry_t *sep, int flags)
@@ -696,7 +697,7 @@ __zfsctl_unmount_snapshot(zfs_snapentry_t *sep, int flags)
 
        argv[2] = kmem_asprintf(SET_UNMOUNT_CMD,
            flags & MNT_FORCE ? "-f " : "", sep->se_path);
-       error = call_usermodehelper(argv[0], argv, envp, 1);
+       error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
        strfree(argv[2]);
 
        /*
@@ -822,7 +823,7 @@ zfsctl_mount_snapshot(struct path *path, int flags)
         * to safely abort the automount.  This should be very rare.
         */
        argv[2] = kmem_asprintf(SET_MOUNT_CMD, full_name, full_path);
-       error = call_usermodehelper(argv[0], argv, envp, 1);
+       error = call_usermodehelper(argv[0], argv, envp, UMH_WAIT_PROC);
        strfree(argv[2]);
        if (error) {
                printk("ZFS: Unable to automount %s at %s: %d\n",
@@ -908,7 +909,7 @@ zfsctl_lookup_objset(struct super_block *sb, uint64_t objsetid, zfs_sb_t **zsbp)
         */
        sep = avl_first(&zsb->z_ctldir_snaps);
        while (sep != NULL) {
-               error = dmu_snapshot_id(zsb->z_os, sep->se_name, &id);
+               error = dmu_snapshot_lookup(zsb->z_os, sep->se_name, &id);
                if (error)
                        goto out;