mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
coda: replace upc_alloc/upc_free with kmalloc/kfree
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
978752534e
commit
37461e1957
2 changed files with 6 additions and 11 deletions
|
@ -49,8 +49,6 @@
|
||||||
|
|
||||||
#include "coda_int.h"
|
#include "coda_int.h"
|
||||||
|
|
||||||
#define upc_free(r) kfree(r)
|
|
||||||
|
|
||||||
/* statistics */
|
/* statistics */
|
||||||
int coda_hard; /* allows signals during upcalls */
|
int coda_hard; /* allows signals during upcalls */
|
||||||
unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
|
unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
|
||||||
|
@ -264,7 +262,7 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf,
|
||||||
}
|
}
|
||||||
|
|
||||||
CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
|
CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
|
||||||
upc_free(req);
|
kfree(req);
|
||||||
out:
|
out:
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
return (count ? count : retval);
|
return (count ? count : retval);
|
||||||
|
@ -320,7 +318,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
|
||||||
/* Async requests need to be freed here */
|
/* Async requests need to be freed here */
|
||||||
if (req->uc_flags & REQ_ASYNC) {
|
if (req->uc_flags & REQ_ASYNC) {
|
||||||
CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
|
CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
|
||||||
upc_free(req);
|
kfree(req);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
req->uc_flags |= REQ_ABORT;
|
req->uc_flags |= REQ_ABORT;
|
||||||
|
|
|
@ -37,9 +37,6 @@
|
||||||
#include <linux/coda_cache.h>
|
#include <linux/coda_cache.h>
|
||||||
#include <linux/coda_proc.h>
|
#include <linux/coda_proc.h>
|
||||||
|
|
||||||
#define upc_alloc() kmalloc(sizeof(struct upc_req), GFP_KERNEL)
|
|
||||||
#define upc_free(r) kfree(r)
|
|
||||||
|
|
||||||
static int coda_upcall(struct coda_sb_info *mntinfo, int inSize, int *outSize,
|
static int coda_upcall(struct coda_sb_info *mntinfo, int inSize, int *outSize,
|
||||||
union inputArgs *buffer);
|
union inputArgs *buffer);
|
||||||
|
|
||||||
|
@ -745,7 +742,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Format the request message. */
|
/* Format the request message. */
|
||||||
req = upc_alloc();
|
req = kmalloc(sizeof(struct upc_req), GFP_KERNEL);
|
||||||
if (!req)
|
if (!req)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
@ -802,12 +799,12 @@ static int coda_upcall(struct coda_sb_info *sbi,
|
||||||
}
|
}
|
||||||
|
|
||||||
error = -ENOMEM;
|
error = -ENOMEM;
|
||||||
sig_req = upc_alloc();
|
sig_req = kmalloc(sizeof(struct upc_req), GFP_KERNEL);
|
||||||
if (!sig_req) goto exit;
|
if (!sig_req) goto exit;
|
||||||
|
|
||||||
CODA_ALLOC((sig_req->uc_data), char *, sizeof(struct coda_in_hdr));
|
CODA_ALLOC((sig_req->uc_data), char *, sizeof(struct coda_in_hdr));
|
||||||
if (!sig_req->uc_data) {
|
if (!sig_req->uc_data) {
|
||||||
upc_free(sig_req);
|
kfree(sig_req);
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -827,7 +824,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
|
||||||
wake_up_interruptible(&vcommp->vc_waitq);
|
wake_up_interruptible(&vcommp->vc_waitq);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
upc_free(req);
|
kfree(req);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue