file: Rename __close_fd to close_fd and remove the files parameter
[sfrench/cifs-2.6.git] / fs / file.c
index 621563701bd99aaed1d19fc52b77b3270fdb8957..987ea51630b442d8c4aa9257afcd282ee3cbe9de 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -629,11 +629,9 @@ out_unlock:
        return file;
 }
 
-/*
- * The same warnings as for __alloc_fd()/__fd_install() apply here...
- */
-int __close_fd(struct files_struct *files, unsigned fd)
+int close_fd(unsigned fd)
 {
+       struct files_struct *files = current->files;
        struct file *file;
 
        file = pick_file(files, fd);
@@ -642,7 +640,7 @@ int __close_fd(struct files_struct *files, unsigned fd)
 
        return filp_close(file, files);
 }
-EXPORT_SYMBOL(__close_fd); /* for ksys_close() */
+EXPORT_SYMBOL(close_fd); /* for ksys_close() */
 
 /**
  * __close_range() - Close all file descriptors in a given range.
@@ -1027,7 +1025,7 @@ int replace_fd(unsigned fd, struct file *file, unsigned flags)
        struct files_struct *files = current->files;
 
        if (!file)
-               return __close_fd(files, fd);
+               return close_fd(fd);
 
        if (fd >= rlimit(RLIMIT_NOFILE))
                return -EBADF;