diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lustre_lib.h')
-rw-r--r-- | drivers/staging/lustre/lustre/include/lustre_lib.h | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index 43ee9f0eb4d4..428469fec534 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h @@ -97,10 +97,10 @@ struct obd_client_handle { __u32 och_magic; fmode_t och_flags; }; + #define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed /* statfs_pack.c */ -void statfs_pack(struct obd_statfs *osfs, struct kstatfs *sfs); void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs); /* @@ -178,6 +178,7 @@ struct obd_ioctl_hdr { static inline int obd_ioctl_packlen(struct obd_ioctl_data *data) { int len = cfs_size_round(sizeof(struct obd_ioctl_data)); + len += cfs_size_round(data->ioc_inllen1); len += cfs_size_round(data->ioc_inllen2); len += cfs_size_round(data->ioc_inllen3); @@ -185,7 +186,6 @@ static inline int obd_ioctl_packlen(struct obd_ioctl_data *data) return len; } - static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data) { if (data->ioc_len > OBD_MAX_IOCTL_BUFFER) { @@ -249,7 +249,6 @@ static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data) return 0; } - #include "obd_support.h" /* function defined in lustre/obdclass/<platform>/<platform>-module.c */ @@ -258,7 +257,7 @@ int obd_ioctl_popdata(void *arg, void *data, int len); static inline void obd_ioctl_freedata(char *buf, int len) { - OBD_FREE_LARGE(buf, len); + kvfree(buf); return; } @@ -289,7 +288,6 @@ static inline void obd_ioctl_freedata(char *buf, int len) #define OBD_IOC_READ _IOWR('f', 109, OBD_IOC_DATA_TYPE) #define OBD_IOC_WRITE _IOWR('f', 110, OBD_IOC_DATA_TYPE) - #define OBD_IOC_STATFS _IOWR('f', 113, OBD_IOC_DATA_TYPE) #define OBD_IOC_SYNC _IOW ('f', 114, OBD_IOC_DATA_TYPE) #define OBD_IOC_READ2 _IOWR('f', 115, OBD_IOC_DATA_TYPE) @@ -313,7 +311,7 @@ static inline void obd_ioctl_freedata(char *buf, int len) #define OBD_IOC_CLIENT_RECOVER _IOW ('f', 133, OBD_IOC_DATA_TYPE) #define OBD_IOC_PING_TARGET _IOW ('f', 136, OBD_IOC_DATA_TYPE) -#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139 ) +#define OBD_IOC_DEC_FS_USE_COUNT _IO ('f', 139) #define OBD_IOC_NO_TRANSNO _IOW ('f', 140, OBD_IOC_DATA_TYPE) #define OBD_IOC_SET_READONLY _IOW ('f', 141, OBD_IOC_DATA_TYPE) #define OBD_IOC_ABORT_RECOVERY _IOR ('f', 142, OBD_IOC_DATA_TYPE) @@ -453,7 +451,7 @@ static inline void obd_ioctl_freedata(char *buf, int len) * __wake_up_common(q, ...); (2.2) * spin_unlock(&q->lock, flags); (2.3) * - * OBD_FREE_PTR(obj); (3) + * kfree(obj); (3) * * As l_wait_event() may "short-cut" execution and return without taking * wait-queue spin-lock, some additional synchronization is necessary to @@ -523,7 +521,6 @@ struct l_wait_info { sigmask(SIGTERM) | sigmask(SIGQUIT) | \ sigmask(SIGALRM)) - /* * wait for @condition to become true, but no longer than timeout, specified * by @info. @@ -557,9 +554,9 @@ do { \ if (__timeout == 0) { \ schedule(); \ } else { \ - long interval = info->lwi_interval? \ + long interval = info->lwi_interval ? \ min_t(long, \ - info->lwi_interval,__timeout):\ + info->lwi_interval, __timeout) : \ __timeout; \ long remaining = schedule_timeout(interval);\ __timeout = cfs_time_sub(__timeout, \ @@ -604,8 +601,6 @@ do { \ remove_wait_queue(&wq, &__wait); \ } while (0) - - #define l_wait_event(wq, condition, info) \ ({ \ int __ret; \ |