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
move handling CATALOGS file at osc layer and forbid access to llog
[fs/lustre-release.git]
/
lustre
/
obdclass
/
llog_ioctl.c
diff --git
a/lustre/obdclass/llog_ioctl.c
b/lustre/obdclass/llog_ioctl.c
index
23da576
..
8d57e18
100644
(file)
--- a/
lustre/obdclass/llog_ioctl.c
+++ b/
lustre/obdclass/llog_ioctl.c
@@
-16,8
+16,8
@@
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
* in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see
[sun.com URL with a
- *
copy of GPLv2].
+ * version 2 along with this program; If not, see
+ *
http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
* CA 95054 USA or visit www.sun.com if you need additional information or
@@
-432,16
+432,14
@@
int llog_catalog_list(struct obd_device *obd, int count,
ENTRY;
size = sizeof(*idarray) * count;
ENTRY;
size = sizeof(*idarray) * count;
- OBD_ALLOC(idarray, size);
+ OBD_
VM
ALLOC(idarray, size);
if (!idarray)
RETURN(-ENOMEM);
if (!idarray)
RETURN(-ENOMEM);
- memset(idarray, 0, size);
- rc = llog_get_cat_list(obd, obd, name, count, idarray);
- if (rc) {
- OBD_FREE(idarray, size);
- RETURN(rc);
- }
+ mutex_down(&obd->obd_olg.olg_cat_processing);
+ rc = llog_get_cat_list(obd, name, 0, count, idarray);
+ if (rc)
+ GOTO(out, rc);
out = data->ioc_bulk;
remains = data->ioc_inllen1;
out = data->ioc_bulk;
remains = data->ioc_inllen1;
@@
-457,8
+455,12
@@
int llog_catalog_list(struct obd_device *obd, int count,
break;
}
}
break;
}
}
- OBD_FREE(idarray, size);
- RETURN(0);
+out:
+ /* release semaphore */
+ mutex_up(&obd->obd_olg.olg_cat_processing);
+
+ OBD_VFREE(idarray, size);
+ RETURN(rc);
}
EXPORT_SYMBOL(llog_catalog_list);
}
EXPORT_SYMBOL(llog_catalog_list);