aboutsummaryrefslogtreecommitdiffstats
path: root/fs/coda
diff options
context:
space:
mode:
Diffstat (limited to 'fs/coda')
-rw-r--r--fs/coda/psdev.c6
-rw-r--r--fs/coda/upcall.c11
2 files changed, 6 insertions, 11 deletions
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c
index 6818c20372ca..8a09f19596db 100644
--- a/fs/coda/psdev.c
+++ b/fs/coda/psdev.c
@@ -49,8 +49,6 @@
49 49
50#include "coda_int.h" 50#include "coda_int.h"
51 51
52#define upc_free(r) kfree(r)
53
54/* statistics */ 52/* statistics */
55int coda_hard; /* allows signals during upcalls */ 53int coda_hard; /* allows signals during upcalls */
56unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */ 54unsigned 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,
264 } 262 }
265 263
266 CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); 264 CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
267 upc_free(req); 265 kfree(req);
268out: 266out:
269 unlock_kernel(); 267 unlock_kernel();
270 return (count ? count : retval); 268 return (count ? count : retval);
@@ -320,7 +318,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
320 /* Async requests need to be freed here */ 318 /* Async requests need to be freed here */
321 if (req->uc_flags & REQ_ASYNC) { 319 if (req->uc_flags & REQ_ASYNC) {
322 CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); 320 CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
323 upc_free(req); 321 kfree(req);
324 continue; 322 continue;
325 } 323 }
326 req->uc_flags |= REQ_ABORT; 324 req->uc_flags |= REQ_ABORT;
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index ad65ee01790f..330de7dbdcf8 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -37,9 +37,6 @@
37#include <linux/coda_cache.h> 37#include <linux/coda_cache.h>
38#include <linux/coda_proc.h> 38#include <linux/coda_proc.h>
39 39
40#define upc_alloc() kmalloc(sizeof(struct upc_req), GFP_KERNEL)
41#define upc_free(r) kfree(r)
42
43static int coda_upcall(struct coda_sb_info *mntinfo, int inSize, int *outSize, 40static int coda_upcall(struct coda_sb_info *mntinfo, int inSize, int *outSize,
44 union inputArgs *buffer); 41 union inputArgs *buffer);
45 42
@@ -745,7 +742,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
745 } 742 }
746 743
747 /* Format the request message. */ 744 /* Format the request message. */
748 req = upc_alloc(); 745 req = kmalloc(sizeof(struct upc_req), GFP_KERNEL);
749 if (!req) 746 if (!req)
750 return -ENOMEM; 747 return -ENOMEM;
751 748
@@ -802,12 +799,12 @@ static int coda_upcall(struct coda_sb_info *sbi,
802 } 799 }
803 800
804 error = -ENOMEM; 801 error = -ENOMEM;
805 sig_req = upc_alloc(); 802 sig_req = kmalloc(sizeof(struct upc_req), GFP_KERNEL);
806 if (!sig_req) goto exit; 803 if (!sig_req) goto exit;
807 804
808 CODA_ALLOC((sig_req->uc_data), char *, sizeof(struct coda_in_hdr)); 805 CODA_ALLOC((sig_req->uc_data), char *, sizeof(struct coda_in_hdr));
809 if (!sig_req->uc_data) { 806 if (!sig_req->uc_data) {
810 upc_free(sig_req); 807 kfree(sig_req);
811 goto exit; 808 goto exit;
812 } 809 }
813 810
@@ -827,7 +824,7 @@ static int coda_upcall(struct coda_sb_info *sbi,
827 wake_up_interruptible(&vcommp->vc_waitq); 824 wake_up_interruptible(&vcommp->vc_waitq);
828 825
829exit: 826exit:
830 upc_free(req); 827 kfree(req);
831 return error; 828 return error;
832} 829}
833 830