/* This function returns %0 on success and a negative error code on failure.  */
int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr)
/* This function returns %0 on success and a negative error code on failure.  */
int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr)
{
	int err;
	if (rd) {
		err = lpt_init_rd(c);
		if (err)
			return err;
	}
	if (wr) {
		err = lpt_init_wr(c);
		if (err)
			return err;
	}
	return 0;
}