From patchwork Fri Oct 19 08:19:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648807 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0EC714E2 for ; Fri, 19 Oct 2018 08:20:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3F1F289CB for ; Fri, 19 Oct 2018 08:20:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A87F228AA8; Fri, 19 Oct 2018 08:20:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 235C9289CB for ; Fri, 19 Oct 2018 08:20:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727336AbeJSQZL (ORCPT ); Fri, 19 Oct 2018 12:25:11 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:36159 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbeJSQZK (ORCPT ); Fri, 19 Oct 2018 12:25:10 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:i2sxkhGDrLY2HQeD3JDb4p1GYnF86YWxBRYc798ds5kLTJ7yrs+wAkXT6L1XgUPTWs2DsrQY07WQ6/iocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3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4O3Tjx4y/yRuD8uBy2GNU310nmQQSj84xq9wukJ9x0yY0ah7g/1YE8Jc5+9TXgghK5GPh9B9XtnxQgfpetaPVUbjTNK7Bz04UtM2xZkJeUkuNc+li0Xt1iCrCrlduaaGCJEu86nflyz/Lsxz423Fxa8skx8sT50cZiWdmqdj+l2LVMbymEKDmvPyeA== X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AxAACMkslb/7dPQldjHAEBAQQBAQcEAQGBUQcBAQsBgQh8gVMSKIwNX41+AYhQjgmBejgBhEAChQMiNA0NAQMBAQIBAQIBbCiCNiKCYgYnLyMQUTkeGYMhgXURp1ozg32GJ4cshDqBQT+BEY1qAohpBJVUCYYhiksCFZApLJdpOIFVTSAYgyeCJheOHD0wgQMBPQGKMgEB X-IPAS-Result: A2AxAACMkslb/7dPQldjHAEBAQQBAQcEAQGBUQcBAQsBgQh8gVMSKIwNX41+AYhQjgmBejgBhEAChQMiNA0NAQMBAQIBAQIBbCiCNiKCYgYnLyMQUTkeGYMhgXURp1ozg32GJ4cshDqBQT+BEY1qAohpBJVUCYYhiksCFZApLJdpOIFVTSAYgyeCJheOHD0wgQMBPQGKMgEB Received: from 183.79-66-87.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([87.66.79.183]) by relay.skynet.be with ESMTP; 19 Oct 2018 10:20:06 +0200 From: Fabian Frederick To: akpm@linux-foundation.org Cc: jaharkes@cs.cmu.edu, coda@cs.cmu.edu, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, fabf@skynet.be Subject: [PATCH 1/7 linux-next] coda: remove CODA_FREE Date: Fri, 19 Oct 2018 10:19:27 +0200 Message-Id: <1539937173-26260-2-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1539937173-26260-1-git-send-email-fabf@skynet.be> References: <1539937173-26260-1-git-send-email-fabf@skynet.be> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since commit 1d5cfdb07628 ("tree wide: use kvfree() than conditional kfree()/vfree()") size in CODA_FREE is no longer used and that macro hides nothing more than kvfree() Signed-off-by: Fabian Frederick --- fs/coda/coda_linux.h | 2 -- fs/coda/psdev.c | 8 ++++---- fs/coda/upcall.c | 36 ++++++++++++++++++------------------ 3 files changed, 22 insertions(+), 24 deletions(-) diff --git a/fs/coda/coda_linux.h b/fs/coda/coda_linux.h index 126155c..903f2a3 100644 --- a/fs/coda/coda_linux.h +++ b/fs/coda/coda_linux.h @@ -73,8 +73,6 @@ void coda_sysctl_clean(void); } while (0) -#define CODA_FREE(ptr, size) kvfree((ptr)) - /* inode to cnode access functions */ static inline struct coda_inode_info *ITOC(struct inode *inode) diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index c5234c2..cbdddf4 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -126,7 +126,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, } CODA_ALLOC(dcbuf, union outputArgs *, nbytes); if (copy_from_user(dcbuf, buf, nbytes)) { - CODA_FREE(dcbuf, nbytes); + kvfree(dcbuf); retval = -EFAULT; goto out; } @@ -134,7 +134,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf, /* what downcall errors does Venus handle ? */ error = coda_downcall(vcp, hdr.opcode, dcbuf); - CODA_FREE(dcbuf, nbytes); + kvfree(dcbuf); if (error) { pr_warn("%s: coda_downcall error: %d\n", __func__, error); @@ -257,7 +257,7 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf, goto out; } - CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); + kvfree(req->uc_data); kfree(req); out: mutex_unlock(&vcp->vc_mutex); @@ -319,7 +319,7 @@ static int coda_psdev_release(struct inode * inode, struct file * file) /* Async requests need to be freed here */ if (req->uc_flags & CODA_REQ_ASYNC) { - CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr)); + kvfree(req->uc_data); kfree(req); continue; } diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index 1175a17..d0d0fed 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -85,7 +85,7 @@ int venus_rootfid(struct super_block *sb, struct CodaFid *fidp) if (!error) *fidp = outp->coda_root.VFid; - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -104,7 +104,7 @@ int venus_getattr(struct super_block *sb, struct CodaFid *fid, if (!error) *attr = outp->coda_getattr.attr; - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -123,7 +123,7 @@ int venus_setattr(struct super_block *sb, struct CodaFid *fid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -153,7 +153,7 @@ int venus_lookup(struct super_block *sb, struct CodaFid *fid, *type = outp->coda_lookup.vtype; } - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -173,7 +173,7 @@ int venus_close(struct super_block *sb, struct CodaFid *fid, int flags, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -194,7 +194,7 @@ int venus_open(struct super_block *sb, struct CodaFid *fid, if (!error) *fh = outp->coda_open_by_fd.fh; - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -224,7 +224,7 @@ int venus_mkdir(struct super_block *sb, struct CodaFid *dirfid, *newfid = outp->coda_mkdir.VFid; } - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -262,7 +262,7 @@ int venus_rename(struct super_block *sb, struct CodaFid *old_fid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -295,7 +295,7 @@ int venus_create(struct super_block *sb, struct CodaFid *dirfid, *newfid = outp->coda_create.VFid; } - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -318,7 +318,7 @@ int venus_rmdir(struct super_block *sb, struct CodaFid *dirfid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -340,7 +340,7 @@ int venus_remove(struct super_block *sb, struct CodaFid *dirfid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -370,7 +370,7 @@ int venus_readlink(struct super_block *sb, struct CodaFid *fid, *(buffer + retlen) = '\0'; } - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -398,7 +398,7 @@ int venus_link(struct super_block *sb, struct CodaFid *fid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -433,7 +433,7 @@ int venus_symlink(struct super_block *sb, struct CodaFid *fid, error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -449,7 +449,7 @@ int venus_fsync(struct super_block *sb, struct CodaFid *fid) inp->coda_fsync.VFid = *fid; error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -467,7 +467,7 @@ int venus_access(struct super_block *sb, struct CodaFid *fid, int mask) error = coda_upcall(coda_vcp(sb), insize, &outsize, inp); - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -543,7 +543,7 @@ int venus_pioctl(struct super_block *sb, struct CodaFid *fid, } exit: - CODA_FREE(inp, insize); + kvfree(inp); return error; } @@ -565,7 +565,7 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs) sfs->f_ffree = outp->coda_statfs.stat.f_ffree; } - CODA_FREE(inp, insize); + kvfree(inp); return error; }