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; } From patchwork Fri Oct 19 08:19:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648809 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 9369914E2 for ; Fri, 19 Oct 2018 08:20:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 84D48289CB for ; Fri, 19 Oct 2018 08:20:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 792CB28AA8; Fri, 19 Oct 2018 08:20:54 +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 1ECAA289CB for ; Fri, 19 Oct 2018 08:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727500AbeJSQZs (ORCPT ); Fri, 19 Oct 2018 12:25:48 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:36165 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727296AbeJSQZK (ORCPT ); Fri, 19 Oct 2018 12:25:10 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:VNSS8RVy3n3tBeXVVEq3LzixWWjV8LGtZVwlr6E/grcLSJyIuqrYbR2Et8tkgFKBZ4jH8fUM07OQ7/i/HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9wIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6t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ort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AZAACMkslb/7dPQldjGwEBAQEDAQEBBwMBAQGBUgUBAQELAYEIfIFTEiiMbI1+AYhQjgmBejgBhDoEAgKFAyI1DA0BAwEBAgEBAgFsKII2IoJiBicvIxBROR4ZgyGBdRGnWjODfYYnhyyEOoFBP4ERiF2FDQKeQQmGIYpLAhWBQI5pLJdrAjSBVU0gGIMngiYXjhw9MIEDAT0BijIBAQ X-IPAS-Result: A2AZAACMkslb/7dPQldjGwEBAQEDAQEBBwMBAQGBUgUBAQELAYEIfIFTEiiMbI1+AYhQjgmBejgBhDoEAgKFAyI1DA0BAwEBAgEBAgFsKII2IoJiBicvIxBROR4ZgyGBdRGnWjODfYYnhyyEOoFBP4ERiF2FDQKeQQmGIYpLAhWBQI5pLJdrAjSBVU0gGIMngiYXjhw9MIEDAT0BijIBAQ 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:07 +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 2/7 linux-next] coda: destroy mutex in put_super() Date: Fri, 19 Oct 2018 10:19:28 +0200 Message-Id: <1539937173-26260-3-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 we can safely destroy vc_mutex at the end of umount process. Signed-off-by: Fabian Frederick --- fs/coda/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/coda/inode.c b/fs/coda/inode.c index dd819c1..69bb64d 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -244,6 +244,7 @@ static void coda_put_super(struct super_block *sb) vcp->vc_sb = NULL; sb->s_fs_info = NULL; mutex_unlock(&vcp->vc_mutex); + mutex_destroy(&vcp->vc_mutex); pr_info("Bye bye.\n"); } From patchwork Fri Oct 19 08:19:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648805 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 8791513A4 for ; Fri, 19 Oct 2018 08:20:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79D65289CB for ; Fri, 19 Oct 2018 08:20:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6E7BF28AA8; Fri, 19 Oct 2018 08:20:43 +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 10321289CB for ; Fri, 19 Oct 2018 08:20:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727365AbeJSQZN (ORCPT ); Fri, 19 Oct 2018 12:25:13 -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 S1727215AbeJSQZM (ORCPT ); Fri, 19 Oct 2018 12:25:12 -0400 X-Belgacom-Dynamic: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yjdcbC2sKvRQxTPbsiFKcVT5ffXGyX7gz5jsjEoKpEZ/DRpyxgLyGxCq7GpxWZmZbClGDCHvodJuLW+0KaC2MJs9siSIEVbe/RI87zx2utxH1y6BhLuXK/i0Ur5Xj1MJ65+fLjxE96SR0D9iB02GKV2x0kHkHSCQ43K1kukx9yVeC0a5mjPxED9Bc/O1GAU8GMsvVzPR/I9TzXB/RO9mOVVCqS8mnBjd3Scg+kPEUZEMoNdyojxnFlwSwDrMYjb2AB9Rg/KvW0VDqJNd7xmqA3qR33ApueddGKWDz3v03zAPUHYOcy0g= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AxAACMkslb/7dPQldjHAEBAQQBAQcEAQGBUQcBAQsBgQh8gVMSKIwNX41+AYhQjgmBejgBhDoEAgKFAyI0DQ0BAwEBAgEBAgFsKII2IoJiBicvIxBROR4ZgyGBdRGnWjODfYYnhyyEOoFBP4hqgQSFDQKeQQmGIYpLAhWBQI5pmBU4gVVNIBiDJ5BZPTCBAwE9AYdlgk0BAQ X-IPAS-Result: A2AxAACMkslb/7dPQldjHAEBAQQBAQcEAQGBUQcBAQsBgQh8gVMSKIwNX41+AYhQjgmBejgBhDoEAgKFAyI0DQ0BAwEBAgEBAgFsKII2IoJiBicvIxBROR4ZgyGBdRGnWjODfYYnhyyEOoFBP4hqgQSFDQKeQQmGIYpLAhWBQI5pmBU4gVVNIBiDJ5BZPTCBAwE9AYdlgk0BAQ 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:09 +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 3/7 linux-next] coda: use SIZE() for stat Date: Fri, 19 Oct 2018 10:19:29 +0200 Message-Id: <1539937173-26260-4-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 max_t expression was already defined in coda sources Signed-off-by: Fabian Frederick --- fs/coda/upcall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c index d0d0fed..1323793 100644 --- a/fs/coda/upcall.c +++ b/fs/coda/upcall.c @@ -553,7 +553,7 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs) union outputArgs *outp; int insize, outsize, error; - insize = max_t(unsigned int, INSIZE(statfs), OUTSIZE(statfs)); + insize = SIZE(statfs); UPARG(CODA_STATFS); error = coda_upcall(coda_vcp(dentry->d_sb), insize, &outsize, inp); From patchwork Fri Oct 19 08:19:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648803 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 EE2D313A4 for ; Fri, 19 Oct 2018 08:20:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E1150289CB for ; Fri, 19 Oct 2018 08:20:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4EA728AA7; Fri, 19 Oct 2018 08:20:38 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI 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 A0E7328AA8 for ; Fri, 19 Oct 2018 08:20:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727426AbeJSQZO (ORCPT ); Fri, 19 Oct 2018 12:25:14 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:36171 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727366AbeJSQZO (ORCPT ); Fri, 19 Oct 2018 12:25:14 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:YsTFhxVsajMx/9vAz2YFLNqj38/V8LGtZVwlr6E/grcLSJyIuqrYbR2Et8tkgFKBZ4jH8fUM07OQ7/i/HzRYqb+681k6OKRWUBEEjchE1ycBO+WiTXPBEfjxciYhF95DXlI2t1uyMExSBdqsLwaK+i764jEdAAjwOhRoLerpBIHSk9631+ev8JHPfglEnjWwba9wIRmssQndqtQdjJd/JKo21hbHuGZDdf5MxWNvK1KTnhL86dm18ZV+7SleuO8v+tBZX6nicKs2UbJXDDI9M2Ao/8LrrgXMTRGO5nQHTGoblAdDDhXf4xH7WpfxtTb6tvZ41SKHM8D6Uaw4VDK/5KptVRTmijoINyQh/W/XlMJ+kaxVrhGmqRN9zY7Ze52ZOOZkc6/BZ94WWXZNU8BMXCJBGIO8aI4PAvIBM+lCtIb9pkEBrR2jDgesHuPg1CJHiWHs3a07z+shEhzN0QsuH90Uq3vUos74NLwRUeG1yqnH0ynDY+lN1jjj8YXFdA0qr/KUXb9ocsfcy1MjGgLEg1mKq4HoOymZ2vkOvmWV6edrSPihhHQ9qw5rpzii3sIsio7UiY0L0l3E7iB5wJotJd2/VU57fcaoEJtOuCGeMIt7WsciQ2Z0tykgzr0GuZm7fDMWyJg9wx7fbOCIfJKM4h3+U+aRJC13hHNjeL6nhhay91avyvHkW8S30ltGtCtIn9jWun0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yGBdRGoDYN9hieHLIQ6gUE/iGqBBIUNAp5BCYYhiksCFYFAjmksl2k4gVVNIBiDJ4ImF44cPTCBAwE9AYdlgk0BAQ 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:11 +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 4/7 linux-next] coda: add __init to init_coda_psdev() Date: Fri, 19 Oct 2018 10:19:30 +0200 Message-Id: <1539937173-26260-5-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 init_coda_psdev() was only called by __init function. Signed-off-by: Fabian Frederick --- fs/coda/psdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index cbdddf4..6d1c95f 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c @@ -352,7 +352,7 @@ static const struct file_operations coda_psdev_fops = { .llseek = noop_llseek, }; -static int init_coda_psdev(void) +static int __init init_coda_psdev(void) { int i, err = 0; if (register_chrdev(CODA_PSDEV_MAJOR, "coda", &coda_psdev_fops)) { From patchwork Fri Oct 19 08:19:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648797 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 A74D813A4 for ; Fri, 19 Oct 2018 08:20:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96ED928AA7 for ; Fri, 19 Oct 2018 08:20:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8B44E28AAF; Fri, 19 Oct 2018 08:20:34 +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 D863928AAE for ; Fri, 19 Oct 2018 08:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727460AbeJSQZS (ORCPT ); Fri, 19 Oct 2018 12:25:18 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:36172 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727215AbeJSQZP (ORCPT ); Fri, 19 Oct 2018 12:25:15 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:MKI9/xJn2Gabliak2NmcpTZWNBhigK39O0sv0rFitYgfI//xwZ3uMQTl6Ol3ixeRBMOHs60C07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffwdFiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflh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QldjHAEBAQQBAQcEAQGBUQcBAQsBgQh8gVMSKIwNX41+AYhQjgmBejgBhEAChQMiNA0NAQMBAQIBAQIBbCiCNiKCYgZWIxBROR4ZgyGBdRGoDYN9hieHLIQ6gUE/gRGIXYUNAohtlVQJhiGKSwIVgU+Ec4lnmBU4gVVNIBiDJ4ImF44cPTCBAwE9AYoyAQE X-IPAS-Result: A2AxAACMkslb/7dPQldjHAEBAQQBAQcEAQGBUQcBAQsBgQh8gVMSKIwNX41+AYhQjgmBejgBhEAChQMiNA0NAQMBAQIBAQIBbCiCNiKCYgZWIxBROR4ZgyGBdRGoDYN9hieHLIQ6gUE/gRGIXYUNAohtlVQJhiGKSwIVgU+Ec4lnmBU4gVVNIBiDJ4ImF44cPTCBAwE9AYoyAQE 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:12 +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 5/7 linux-next] coda: remove sysctl object from module when unused Date: Fri, 19 Oct 2018 10:19:31 +0200 Message-Id: <1539937173-26260-6-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 Inspired by NFS sysctl process Signed-off-by: Fabian Frederick --- fs/coda/Makefile | 3 ++- fs/coda/coda_int.h | 10 ++++++++++ fs/coda/coda_linux.h | 4 ---- fs/coda/sysctl.c | 11 ----------- 4 files changed, 12 insertions(+), 16 deletions(-) diff --git a/fs/coda/Makefile b/fs/coda/Makefile index 1bab69a..30e4e1b 100644 --- a/fs/coda/Makefile +++ b/fs/coda/Makefile @@ -5,7 +5,8 @@ obj-$(CONFIG_CODA_FS) += coda.o coda-objs := psdev.o cache.o cnode.o inode.o dir.o file.o upcall.o \ - coda_linux.o symlink.o pioctl.o sysctl.o + coda_linux.o symlink.o pioctl.o +coda-$(CONFIG_SYSCTL) += sysctl.o # If you want debugging output, please uncomment the following line. diff --git a/fs/coda/coda_int.h b/fs/coda/coda_int.h index bb0b3e0..f82b59c 100644 --- a/fs/coda/coda_int.h +++ b/fs/coda/coda_int.h @@ -13,9 +13,19 @@ extern int coda_fake_statfs; void coda_destroy_inodecache(void); int __init coda_init_inodecache(void); int coda_fsync(struct file *coda_file, loff_t start, loff_t end, int datasync); + +#ifdef CONFIG_SYSCTL void coda_sysctl_init(void); void coda_sysctl_clean(void); +#else +static inline void coda_sysctl_init(void) +{ +} +static inline void coda_sysctl_clean(void) +{ +} +#endif #endif /* _CODA_INT_ */ diff --git a/fs/coda/coda_linux.h b/fs/coda/coda_linux.h index 903f2a3..4087264 100644 --- a/fs/coda/coda_linux.h +++ b/fs/coda/coda_linux.h @@ -59,10 +59,6 @@ void coda_vattr_to_iattr(struct inode *, struct coda_vattr *); void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *); unsigned short coda_flags_to_cflags(unsigned short); -/* sysctl.h */ -void coda_sysctl_init(void); -void coda_sysctl_clean(void); - #define CODA_ALLOC(ptr, cast, size) do { \ if (size < PAGE_SIZE) \ ptr = kzalloc((unsigned long) size, GFP_KERNEL); \ diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 0301d45..fda3b70 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -12,7 +12,6 @@ #include "coda_int.h" -#ifdef CONFIG_SYSCTL static struct ctl_table_header *fs_table_header; static struct ctl_table coda_table[] = { @@ -62,13 +61,3 @@ void coda_sysctl_clean(void) fs_table_header = NULL; } } - -#else -void coda_sysctl_init(void) -{ -} - -void coda_sysctl_clean(void) -{ -} -#endif From patchwork Fri Oct 19 08:19:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648801 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 49FA313A4 for ; Fri, 19 Oct 2018 08:20:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C520289CB for ; Fri, 19 Oct 2018 08:20:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 307B928AAA; Fri, 19 Oct 2018 08:20:37 +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 DF425289CB for ; Fri, 19 Oct 2018 08:20:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727439AbeJSQZS (ORCPT ); Fri, 19 Oct 2018 12:25:18 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:36171 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727398AbeJSQZP (ORCPT ); Fri, 19 Oct 2018 12:25:15 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:l4kUqRMQOWJFIkaXAD0l6mtUPXoX/o7sNwtQ0KIMzox0I/X4rarrMEGX3/hxlliBBdydt6obzbKO+4nbGkU4qa6bt34DdJEeHzQksu4x2zIaPcieFEfgJ+Tr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m0VeD0qh5g/pGGtxP/f9GSRk1ZtbgyLlzCMj3cgbAeMqZDVihX9OqCC0wSdR3xMUBMGhnHND3oBnJ3iOsS5EPmrCGHp0/8eqI0XH7Ke5myGfA2bVnhVRwEZgHDnGvmqMqr1ubPIXOiUjMz6s= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AQAACMkslb/7dPQldjGwEBAQEDAQEBBwMBAQGBUQYBAQELAYEIfIFTEiiMDV+NfgGIUIkdhGyBejgBhDoEAgKFAyI0DQ0BAwEBAgEBAgFsKII2IoJiBlYjEFE5HhmDIYF1EagNg32GJ4cshDqBQT+BEYRdhACFDQKeQQmGIYpLAhWQKSyXaTiBVU0gGIMngiUBF44cPTCBAwE9AYoyAQE X-IPAS-Result: A2AQAACMkslb/7dPQldjGwEBAQEDAQEBBwMBAQGBUQYBAQELAYEIfIFTEiiMDV+NfgGIUIkdhGyBejgBhDoEAgKFAyI0DQ0BAwEBAgEBAgFsKII2IoJiBlYjEFE5HhmDIYF1EagNg32GJ4cshDqBQT+BEYRdhACFDQKeQQmGIYpLAhWQKSyXaTiBVU0gGIMngiUBF44cPTCBAwE9AYoyAQE 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:13 +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 6/7 linux-next] coda: remove sb test in coda_fid_to_inode() Date: Fri, 19 Oct 2018 10:19:32 +0200 Message-Id: <1539937173-26260-7-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 coda_fid_to_inode() is only called by coda_downcall() where sb is already being tested. Signed-off-by: Fabian Frederick --- fs/coda/cnode.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 845b5a6..c42d340 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c @@ -137,11 +137,6 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) struct inode *inode; unsigned long hash = coda_f2i(fid); - if ( !sb ) { - pr_warn("%s: no sb!\n", __func__); - return NULL; - } - inode = ilookup5(sb, hash, coda_test_inode, fid); if ( !inode ) return NULL; From patchwork Fri Oct 19 08:19:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 10648799 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 BC54C3B73 for ; Fri, 19 Oct 2018 08:20:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEA5B28AA7 for ; Fri, 19 Oct 2018 08:20:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A29CC28AB1; Fri, 19 Oct 2018 08:20:34 +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 ADA6428AAC for ; Fri, 19 Oct 2018 08:20:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727232AbeJSQZU (ORCPT ); Fri, 19 Oct 2018 12:25:20 -0400 Received: from mailrelay101.isp.belgacom.be ([195.238.20.128]:36172 "EHLO mailrelay101.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727366AbeJSQZT (ORCPT ); Fri, 19 Oct 2018 12:25:19 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: 9a23:FTLfSxfCLYXT9hgsbdMGYWx+lGMj4u6mDksu8pMizoh2WeGdxcWzZx7h7PlgxGXEQZ/co6odzbaO7Oa4ASQp2tWoiDg6aptCVhsI2409vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7Ovr6GpLIj8Swyuu+54Dfbx9HiTahY75+Ngm6oRnMvcQKnIVuLbo8xAHUqXVSYeRWwm1oJVOXnxni48q74YBu/SdNtf8/7sBMSar1cbg2QrxeFzQmLns65Nb3uhnZTAuA/WUTX2MLmRdVGQfF7RX6XpDssivms+d2xSeXMdHqQb0yRD+v6bpgRh31hycdLzM38H/ZhNF+gqxYpxyupRJ/zpXIbI2JLvdyYrnQcc8GSWdHQ81fVzZBAoS5b4YXD+QOJ/1Xr4jnqFsIsBCwBROsC/3yxTBWnH/23LE10+c8GgzB0gwvBckBsHrPodXuN6cTUea1w7fUzTnZdPxZxy7w5Y7VeR4iufGBRbF9fMjLxUQuFg7JlFedpIj/Mz+I1ekAvW6W5Pd6W+21kW4osQRxryCqxscrl4bGmJoYykvB9SVl2IY1IsC4SFJjbd6kDpRQsyaaOpNyQsMlX25noiI6yr0BuZ6gYCgG0pAnxxnDZPOdd4iH/xXjVOOLLjd5gnJpYLO/hxCs/ki80uDxVcu53ExLoydEiNXBtHQA2wbO5sWERPZx5kKh1iyO1wDX5OFEO0c0la/DJp4v2LE/jZQTvF/YHi/1mET2irGZdlk+9uez9evreq/mqYOEN49olgH+Nbwjlda8AeQgNwgDRGyb+eW61L3+8kz1WbtKjvorkqnfrZ/VP9gbpq++Aw9TyIoj7Ay/Dzi+2tQCgXYHNE5FeA6Aj4XxOVHBOvD4Au2lg1Svjjhr3OvLMaH6ApnXMnfDlarhcaxj5EFB1Qo51cpf6I5MCrEdPPLzXVf8u8DfDhAkKQO52ProCM5n2owCXGKPH7WVP73Pvl+V/ugvOfWDZJcJuDbhLPgo//rujX4/mV8AcqilxJUXaGulEft4PUWWf37sj8wfEWcFoAU+VvbmiF6cXj5JYXa9QaY86is8CIK8AofJXpqtj6CZ3CenAp1WYXhLClSNEXfuaoWFVO4AaCGMLc97lDwLS7yhRpQ/1RGhqgD60aBrLunK9S0Cs5Lsytx16/fUlREo+jx+F96d3H2VT2FogmMIQCc73K5lrkNmxFeOyrN4g/9YFNxV+fxJTh02OoXCwL8yN9enUwHZe/+NSVC7UpCoBiw3QtstwtgIJUFnFIaMlBfGigSjCb4ckfSlHpE4/7jd1Hu5c8h0wXjuz6owiVQ6BMFCYz71zpVj/hTeUtaa236SkLynIPwR X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2AQAACMkslb/7dPQldjGwEBAQEDAQEBBwMBAQGBUQYBAQELAYEIfIFTEiiMDV+NfgGIUI4JgXo4AYRAAoUDIjQNDQEDAQECAQECAWwogjYigmIGJy8jEFE5HhmDIYF1EadaM4N9hieHLIQ6gUE/gRGNagKIbZVUCYYhiksCFZApmBU4gVVNIBiDJ4ImF44cPTCBAwE9AYoyAQE X-IPAS-Result: A2AQAACMkslb/7dPQldjGwEBAQEDAQEBBwMBAQGBUQYBAQELAYEIfIFTEiiMDV+NfgGIUI4JgXo4AYRAAoUDIjQNDQEDAQECAQECAWwogjYigmIGJy8jEFE5HhmDIYF1EadaM4N9hieHLIQ6gUE/gRGNagKIbZVUCYYhiksCFZApmBU4gVVNIBiDJ4ImF44cPTCBAwE9AYoyAQE 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:14 +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 7/7 linux-next] coda: ftoc validity check integration Date: Fri, 19 Oct 2018 10:19:33 +0200 Message-Id: <1539937173-26260-8-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 This patch moves cfi check in coda_ftoc() instead of repeating it in the wild. Module size text data bss dec hex filename 28297 1040 700 30037 7555 fs/coda/coda.ko.before 28263 980 700 29943 74f7 fs/coda/coda.ko.after Signed-off-by: Fabian Frederick --- fs/coda/cnode.c | 10 ++++++++++ fs/coda/coda_fs_i.h | 3 +-- fs/coda/dir.c | 6 ++---- fs/coda/file.c | 17 +++++------------ 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index c42d340..36414438 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c @@ -148,6 +148,16 @@ struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb) return inode; } +struct coda_file_info *coda_ftoc(struct file *file) +{ + struct coda_file_info *cfi = file->private_data; + + BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + + return cfi; + +} + /* the CONTROL inode is made without asking attributes from Venus */ struct inode *coda_cnode_makectl(struct super_block *sb) { diff --git a/fs/coda/coda_fs_i.h b/fs/coda/coda_fs_i.h index d702ba1a..c99d574 100644 --- a/fs/coda/coda_fs_i.h +++ b/fs/coda/coda_fs_i.h @@ -42,8 +42,6 @@ struct coda_file_info { unsigned int cfi_mapcount; /* nr of times this file is mapped */ }; -#define CODA_FTOC(file) ((struct coda_file_info *)((file)->private_data)) - /* flags */ #define C_VATTR 0x1 /* Validity of vattr in inode */ #define C_FLUSH 0x2 /* used after a flush */ @@ -54,6 +52,7 @@ struct inode *coda_cnode_make(struct CodaFid *, struct super_block *); struct inode *coda_iget(struct super_block *sb, struct CodaFid *fid, struct coda_vattr *attr); struct inode *coda_cnode_makectl(struct super_block *sb); struct inode *coda_fid_to_inode(struct CodaFid *fid, struct super_block *sb); +struct coda_file_info *coda_ftoc(struct file *file); void coda_replace_fid(struct inode *, struct CodaFid *, struct CodaFid *); #endif diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 00876dd..3e80770 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c @@ -356,8 +356,7 @@ static int coda_venus_readdir(struct file *coda_file, struct dir_context *ctx) ino_t ino; int ret; - cfi = CODA_FTOC(coda_file); - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + cfi = coda_ftoc(coda_file); host_file = cfi->cfi_container; cii = ITOC(file_inode(coda_file)); @@ -426,8 +425,7 @@ static int coda_readdir(struct file *coda_file, struct dir_context *ctx) struct file *host_file; int ret; - cfi = CODA_FTOC(coda_file); - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + cfi = coda_ftoc(coda_file); host_file = cfi->cfi_container; if (host_file->f_op->iterate || host_file->f_op->iterate_shared) { diff --git a/fs/coda/file.c b/fs/coda/file.c index 1cbc1f2..55c22e2 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c @@ -31,9 +31,7 @@ static ssize_t coda_file_read_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *coda_file = iocb->ki_filp; - struct coda_file_info *cfi = CODA_FTOC(coda_file); - - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + struct coda_file_info *cfi = coda_ftoc(coda_file); return vfs_iter_read(cfi->cfi_container, to, &iocb->ki_pos, 0); } @@ -43,12 +41,10 @@ coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *coda_file = iocb->ki_filp; struct inode *coda_inode = file_inode(coda_file); - struct coda_file_info *cfi = CODA_FTOC(coda_file); + struct coda_file_info *cfi = coda_ftoc(coda_file); struct file *host_file; ssize_t ret; - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); - host_file = cfi->cfi_container; file_start_write(host_file); inode_lock(coda_inode); @@ -69,8 +65,7 @@ coda_file_mmap(struct file *coda_file, struct vm_area_struct *vma) struct file *host_file; struct inode *coda_inode, *host_inode; - cfi = CODA_FTOC(coda_file); - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + cfi = coda_ftoc(coda_file); host_file = cfi->cfi_container; if (!host_file->f_op->mmap) @@ -142,8 +137,7 @@ int coda_release(struct inode *coda_inode, struct file *coda_file) struct inode *host_inode; int err; - cfi = CODA_FTOC(coda_file); - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + cfi = coda_ftoc(coda_file); err = venus_close(coda_inode->i_sb, coda_i2f(coda_inode), coda_flags, coda_file->f_cred->fsuid); @@ -185,8 +179,7 @@ int coda_fsync(struct file *coda_file, loff_t start, loff_t end, int datasync) return err; inode_lock(coda_inode); - cfi = CODA_FTOC(coda_file); - BUG_ON(!cfi || cfi->cfi_magic != CODA_MAGIC); + cfi = coda_ftoc(coda_file); host_file = cfi->cfi_container; err = vfs_fsync(host_file, datasync);