Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1994 kernel: fix reference counting with l_dentry_open
[fs/lustre-release.git]
/
lustre
/
obdclass
/
llog_lvfs.c
diff --git
a/lustre/obdclass/llog_lvfs.c
b/lustre/obdclass/llog_lvfs.c
index
1debe27
..
9373474
100644
(file)
--- a/
lustre/obdclass/llog_lvfs.c
+++ b/
lustre/obdclass/llog_lvfs.c
@@
-624,9
+624,9
@@
static int llog_lvfs_open(const struct lu_env *env, struct llog_handle *handle,
logid->lgl_ogen, rc);
GOTO(out, rc);
}
logid->lgl_ogen, rc);
GOTO(out, rc);
}
- /* l_dentry_open will call dput(dchild) if there is an error */
handle->lgh_file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild,
O_RDWR | O_LARGEFILE);
handle->lgh_file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild,
O_RDWR | O_LARGEFILE);
+ l_dput(dchild);
if (IS_ERR(handle->lgh_file)) {
rc = PTR_ERR(handle->lgh_file);
handle->lgh_file = NULL;
if (IS_ERR(handle->lgh_file)) {
rc = PTR_ERR(handle->lgh_file);
handle->lgh_file = NULL;
@@
-736,6
+736,7
@@
static int llog_lvfs_create(const struct lu_env *env,
GOTO(out, rc = PTR_ERR(dchild));
file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild, open_flags);
GOTO(out, rc = PTR_ERR(dchild));
file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild, open_flags);
+ l_dput(dchild);
if (IS_ERR(file))
GOTO(out, rc = PTR_ERR(file));
handle->lgh_id.lgl_oseq = oa->o_seq;
if (IS_ERR(file))
GOTO(out, rc = PTR_ERR(file));
handle->lgh_id.lgl_oseq = oa->o_seq;