diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/obdecho')
-rw-r--r-- | drivers/staging/lustre/lustre/obdecho/Makefile | 3 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/obdecho/echo_client.c | 33 |
2 files changed, 21 insertions, 15 deletions
diff --git a/drivers/staging/lustre/lustre/obdecho/Makefile b/drivers/staging/lustre/lustre/obdecho/Makefile index a659a37a7e93..6be66fbab872 100644 --- a/drivers/staging/lustre/lustre/obdecho/Makefile +++ b/drivers/staging/lustre/lustre/obdecho/Makefile @@ -1,2 +1,5 @@ +subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/include +subdir-ccflags-y += -I$(srctree)/drivers/staging/lustre/lustre/include + obj-$(CONFIG_LUSTRE_FS) += obdecho.o obdecho-y := echo_client.o diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 1c4a8fe87dd8..f9808d1cc352 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -31,18 +31,18 @@ */ #define DEBUG_SUBSYSTEM S_ECHO -#include "../../include/linux/libcfs/libcfs.h" - -#include "../include/obd.h" -#include "../include/obd_support.h" -#include "../include/obd_class.h" -#include "../include/lustre_debug.h" -#include "../include/lprocfs_status.h" -#include "../include/cl_object.h" -#include "../include/lustre_fid.h" -#include "../include/lustre_acl.h" -#include "../include/lustre/lustre_ioctl.h" -#include "../include/lustre_net.h" +#include <linux/libcfs/libcfs.h> + +#include <obd.h> +#include <obd_support.h> +#include <obd_class.h> +#include <lustre_debug.h> +#include <lprocfs_status.h> +#include <cl_object.h> +#include <lustre_fid.h> +#include <lustre_acl.h> +#include <uapi/linux/lustre/lustre_ioctl.h> +#include <lustre_net.h> #include "echo_internal.h" @@ -319,7 +319,7 @@ static void echo_lock_fini(const struct lu_env *env, kmem_cache_free(echo_lock_kmem, ecl); } -static struct cl_lock_operations echo_lock_ops = { +static const struct cl_lock_operations echo_lock_ops = { .clo_fini = echo_lock_fini, }; @@ -1102,8 +1102,11 @@ static int echo_create_object(const struct lu_env *env, struct echo_device *ed, return -EINVAL; } - if (!ostid_id(&oa->o_oi)) - ostid_set_id(&oa->o_oi, ++last_object_id); + if (!ostid_id(&oa->o_oi)) { + rc = ostid_set_id(&oa->o_oi, ++last_object_id); + if (rc) + goto failed; + } rc = obd_create(env, ec->ec_exp, oa); if (rc != 0) { |