aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2013-11-21 13:47:57 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2013-11-21 13:47:57 -0500
commitea0341e071527d5cec350917b01ab901af09d758 (patch)
tree93897b0b02f7d689334e77915e111d8ba4a0b9ba /fs/gfs2
parente3c4269d139db7471ee560fb30948179e180b3d4 (diff)
GFS2: Fix ref count bug relating to atomic_open
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@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r--fs/gfs2/inode.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index 1615df16cf4e..7119504159f1 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -1171,8 +1171,11 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry,
1171 if (d != NULL) 1171 if (d != NULL)
1172 dentry = d; 1172 dentry = d;
1173 if (dentry->d_inode) { 1173 if (dentry->d_inode) {
1174 if (!(*opened & FILE_OPENED)) 1174 if (!(*opened & FILE_OPENED)) {
1175 if (d == NULL)
1176 dget(dentry);
1175 return finish_no_open(file, dentry); 1177 return finish_no_open(file, dentry);
1178 }
1176 dput(d); 1179 dput(d);
1177 return 0; 1180 return 0;
1178 } 1181 }