Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fe9d03
)
fix oops while accessing NULL pointer
author
huanghua
<huanghua>
Wed, 22 Nov 2006 07:36:34 +0000
(07:36 +0000)
committer
huanghua
<huanghua>
Wed, 22 Nov 2006 07:36:34 +0000
(07:36 +0000)
lustre/lmv/lmv_internal.h
patch
|
blob
|
history
diff --git
a/lustre/lmv/lmv_internal.h
b/lustre/lmv/lmv_internal.h
index
27fb215
..
643330d
100644
(file)
--- a/
lustre/lmv/lmv_internal.h
+++ b/
lustre/lmv/lmv_internal.h
@@
-204,7
+204,11
@@
lmv_find_target(struct lmv_obd *lmv, const struct lu_fid *fid)
static inline struct obd_export *
lmv_find_export(struct lmv_obd *lmv, const struct lu_fid *fid)
{
- return lmv_find_target(lmv, fid)->ltd_exp;
+ struct lmv_tgt_desc *tgt = lmv_find_target(lmv, fid);
+ if (IS_ERR(tgt))
+ return (struct obd_export*)tgt;
+ else
+ return tgt->ltd_exp;
}
/* lproc_lmv.c */