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
- numerous fixes from b_cray, b_1_4 and Andreas' comments.
[fs/lustre-release.git]
/
lustre
/
obdfilter
/
filter_san.c
diff --git
a/lustre/obdfilter/filter_san.c
b/lustre/obdfilter/filter_san.c
index
ed4da89
..
c504e01
100644
(file)
--- a/
lustre/obdfilter/filter_san.c
+++ b/
lustre/obdfilter/filter_san.c
@@
-37,21
+37,30
@@
/* sanobd setup methods - use a specific mount option */
int filter_san_setup(struct obd_device *obd, obd_count len, void *buf)
{
/* sanobd setup methods - use a specific mount option */
int filter_san_setup(struct obd_device *obd, obd_count len, void *buf)
{
- struct lustre_cfg* lcfg = buf;
- char *option = NULL;
-
- if (!lustre_cfg_buf(lcfg, 2))
+ struct lustre_cfg *lcfg = buf;
+ unsigned long page;
+ int rc;
+
+ if (lcfg->lcfg_bufcount < 3 || LUSTRE_CFG_BUFLEN(lcfg, 2) < 1)
RETURN(-EINVAL);
RETURN(-EINVAL);
+ /* 2.6.9 selinux wants a full option page for do_kern_mount (bug6471) */
+ page = get_zeroed_page(GFP_KERNEL);
+ if (!page)
+ RETURN(-ENOMEM);
+
/* for extN/ext3 filesystem, we must mount it with 'writeback' mode */
/* for extN/ext3 filesystem, we must mount it with 'writeback' mode */
- if (!strcmp(lustre_cfg_string(lcfg, 2), "
extN
"))
-
option = "data=writeback"
;
+ if (!strcmp(lustre_cfg_string(lcfg, 2), "
ldiskfs
"))
+
strcpy((void *)page, "data=writeback")
;
else if (!strcmp(lustre_cfg_string(lcfg, 2), "ext3"))
else if (!strcmp(lustre_cfg_string(lcfg, 2), "ext3"))
-
option = "data=writeback,asyncdel"
;
+
strcpy((void *)page, "data=writeback,asyncdel")
;
else
LBUG(); /* just a reminder */
else
LBUG(); /* just a reminder */
- return filter_common_setup(obd, len, buf, option);
+ rc = filter_common_setup(obd, len, buf, (void *)page);
+ free_page(page);
+
+ return rc;
}
int filter_san_preprw(int cmd, struct obd_export *exp, struct obdo *oa,
}
int filter_san_preprw(int cmd, struct obd_export *exp, struct obdo *oa,