mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Commit bulk of remaining 2.6.9 and 2.6.26 compat changes.
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@155 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
@@ -357,6 +357,7 @@ fd_uninstall(int fd)
|
||||
struct fdtable *fdt;
|
||||
|
||||
spin_lock(&files->file_lock);
|
||||
#ifdef HAVE_FILES_FDTABLE
|
||||
fdt = files_fdtable(files);
|
||||
|
||||
if (fd >= fdt->max_fds)
|
||||
@@ -368,10 +369,20 @@ fd_uninstall(int fd)
|
||||
|
||||
rcu_assign_pointer(fdt->fd[fd], NULL);
|
||||
FD_CLR(fd, fdt->close_on_exec);
|
||||
#else
|
||||
if (fd >= files->max_fds)
|
||||
goto out_unlock;
|
||||
|
||||
/* Dropping the lock here exposes a minor race but it allows me
|
||||
* to use the existing kernel interfaces for this, and for a test
|
||||
* case I think that's reasonable. */
|
||||
fp = files->fd[fd];
|
||||
if (!fp)
|
||||
goto out_unlock;
|
||||
|
||||
files->fd[fd] = NULL;
|
||||
FD_CLR(fd, files->close_on_exec);
|
||||
#endif
|
||||
/* Dropping the lock here exposes a minor race but it allows me
|
||||
* to use the existing kernel interfaces for this, and for a test
|
||||
* case I think that's reasonable. */
|
||||
spin_unlock(&files->file_lock);
|
||||
put_unused_fd(fd);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user