]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/file.c
Merge tag 'f2fs-for-5.6' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
[linux.git] / fs / file.c
index d044a32c030e049ac28634c11671dbd50f892b19..a364e1a9b7e8e16a1ebbac2a52c97fb43c84aba0 100644 (file)
--- a/fs/file.c
+++ b/fs/file.c
@@ -642,7 +642,9 @@ int __close_fd(struct files_struct *files, unsigned fd)
 EXPORT_SYMBOL(__close_fd); /* for ksys_close() */
 
 /*
- * variant of __close_fd that gets a ref on the file for later fput
+ * variant of __close_fd that gets a ref on the file for later fput.
+ * The caller must ensure that filp_close() called on the file, and then
+ * an fput().
  */
 int __close_fd_get_file(unsigned int fd, struct file **res)
 {
@@ -662,7 +664,7 @@ int __close_fd_get_file(unsigned int fd, struct file **res)
        spin_unlock(&files->file_lock);
        get_file(file);
        *res = file;
-       return filp_close(file, files);
+       return 0;
 
 out_unlock:
        spin_unlock(&files->file_lock);