Patch "VFS: make vfs_fstat() use f[get|put]_light()" has been added to the 3.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    VFS: make vfs_fstat() use f[get|put]_light()

to the 3.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     vfs-make-vfs_fstat-use-f_light.patch
and it can be found in the queue-3.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From e994defb7b6813ba6fa7a2a36e86d2455ad1dc35 Mon Sep 17 00:00:00 2001
From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 28 Apr 2012 14:55:17 -0700
Subject: VFS: make vfs_fstat() use f[get|put]_light()

From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>

commit e994defb7b6813ba6fa7a2a36e86d2455ad1dc35 upstream.

Use the *_light() versions that properly avoid doing the file user count
updates when they are unnecessary.

Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
[xr: Backported to 3.4: adjust function name]
Signed-off-by: Rui Xiang <rui.xiang@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/stat.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/fs/stat.c
+++ b/fs/stat.c
@@ -57,12 +57,13 @@ EXPORT_SYMBOL(vfs_getattr);
 
 int vfs_fstat(unsigned int fd, struct kstat *stat)
 {
-	struct file *f = fget_raw(fd);
+	int fput_needed;
+	struct file *f = fget_light(fd, &fput_needed);
 	int error = -EBADF;
 
 	if (f) {
 		error = vfs_getattr(f->f_path.mnt, f->f_path.dentry, stat);
-		fput(f);
+		fput_light(f, fput_needed);
 	}
 	return error;
 }


Patches currently in stable-queue which might be from torvalds@xxxxxxxxxxxxxxxxxxxx are

queue-3.4/hwpoison-hugetlb-lock_page-unlock_page-does-not-match-for-handling-a-free-hugepage.patch
queue-3.4/x86-64-modify_ldt-make-support-for-16-bit-segments-a-runtime-option.patch
queue-3.4/mm-make-fixup_user_fault-check-the-vma-access-rights-too.patch
queue-3.4/futex-add-another-early-deadlock-detection-check.patch
queue-3.4/list-introduce-list_next_entry-and-list_prev_entry.patch
queue-3.4/futex-prevent-attaching-to-kernel-threads.patch
queue-3.4/vfs-make-vfs_fstat-use-f_light.patch
queue-3.4/ipmi-reset-the-kcs-timeout-when-starting-error-recovery.patch
queue-3.4/fs-cachefiles-add-support-for-large-files-in-filesystem-caching.patch
queue-3.4/ipmi-fix-a-race-restarting-the-timer.patch
queue-3.4/mm-hugetlb.c-add-cond_resched_lock-in-return_unused_surplus_pages.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]