Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328959
b: refs/heads/master
c: c921b40
h: refs/heads/master
i:
  328957: c42aa17
  328955: 6a445e9
  328951: ecd5c68
  328943: ea95fea
  328927: 73c4944
  328895: 0d02bb4
  328831: 5ef327b
  328703: 45eabca
v: v3
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 731d251 commit 90a8d97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1a7bd2265fc57f29400d57f66275cc5918e30aa6
refs/heads/master: c921b40d6201f7ec7b1edf7ea9a844f93e1a27f4
18 changes: 2 additions & 16 deletions trunk/fs/autofs4/dev-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,20 +221,6 @@ static int test_by_type(struct path *path, void *p)
return ino && ino->sbi->type & *(unsigned *)p;
}

static void autofs_dev_ioctl_fd_install(unsigned int fd, struct file *file)
{
struct files_struct *files = current->files;
struct fdtable *fdt;

spin_lock(&files->file_lock);
fdt = files_fdtable(files);
BUG_ON(fdt->fd[fd] != NULL);
rcu_assign_pointer(fdt->fd[fd], file);
__set_close_on_exec(fd, fdt);
spin_unlock(&files->file_lock);
}


/*
* Open a file descriptor on the autofs mount point corresponding
* to the given path and device number (aka. new_encode_dev(sb->s_dev)).
Expand All @@ -243,7 +229,7 @@ static int autofs_dev_ioctl_open_mountpoint(const char *name, dev_t devid)
{
int err, fd;

fd = get_unused_fd();
fd = get_unused_fd_flags(O_CLOEXEC);
if (likely(fd >= 0)) {
struct file *filp;
struct path path;
Expand All @@ -264,7 +250,7 @@ static int autofs_dev_ioctl_open_mountpoint(const char *name, dev_t devid)
goto out;
}

autofs_dev_ioctl_fd_install(fd, filp);
fd_install(fd, filp);
}

return fd;
Expand Down

0 comments on commit 90a8d97

Please sign in to comment.