[3.11.y.z extended stable] Patch "GFS2: Fix ref count bug relating to atomic_open" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed Dec 11 14:39:08 UTC 2013
This is a note to let you know that I have just added a patch titled
GFS2: Fix ref count bug relating to atomic_open
to the linux-3.11.y-queue branch of the 3.11.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.11.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From d390891d3763258b69303fb33a57d289ce4323f8 Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho at redhat.com>
Date: Thu, 21 Nov 2013 18:47:57 +0000
Subject: GFS2: Fix ref count bug relating to atomic_open
commit ea0341e071527d5cec350917b01ab901af09d758 upstream.
In the case that atomic_open calls finish_no_open() with
the dentry that was supplied to gfs2_atomic_open() an
extra reference count is required. This patch fixes that
issue preventing a bug trap triggering at umount time.
Signed-off-by: Steven Whitehouse <swhiteho at redhat.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/gfs2/inode.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index cd58611..e4bd52f 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1166,8 +1166,11 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
if (d != NULL)
dentry = d;
if (dentry->d_inode) {
- if (!(*opened & FILE_OPENED))
+ if (!(*opened & FILE_OPENED)) {
+ if (d == NULL)
+ dget(dentry);
return finish_no_open(file, dentry);
+ }
dput(d);
return 0;
}
--
1.8.3.2
More information about the kernel-team
mailing list