From patchwork Thu Apr 7 10:18:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Murdaca X-Patchwork-Id: 8770721 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D90409FC82 for ; Thu, 7 Apr 2016 10:18:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CC60E20115 for ; Thu, 7 Apr 2016 10:18:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACAD220212 for ; Thu, 7 Apr 2016 10:18:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755250AbcDGKST (ORCPT ); Thu, 7 Apr 2016 06:18:19 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:36219 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755385AbcDGKSS (ORCPT ); Thu, 7 Apr 2016 06:18:18 -0400 Received: by mail-wm0-f53.google.com with SMTP id v188so51090801wme.1 for ; Thu, 07 Apr 2016 03:18:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Zr9Qe0jkIvyMCP/Pz/QrsR5jIwfcuD8sX8+2ECWZMio=; b=MKruZ0ZdUkVGS6UKZGqjDTR1TW9cdQUO7Gkz6TwQhZccj4zjBfCZfo0a6xbRVVzWym oyf3HPLSCESlDsi3GsEheKHXZa5WCy2if2ejcMsWs3ipORUBSjpASvGRVQ84mp3ycuyo bMb9rsmHR6bJRH38NRGc7KANlPCPHbflYWqJS3O5X15AvruNWzbqx2uecaJPzqWu6IAU SBB4MTvhVyAUVaOmUJ3UM4Y6ZjchRmug28bFVBkTeACefsPljXWDJwM1s4Czuuhm16q7 y67e3z5B1eup+X0lryY7yBVJVWtvZYL6Cq7wEVCd0IHeg3ZbokSjx2Sh27AsUPX8Blll exGQ== X-Gm-Message-State: AD7BkJIx8CEF+t83j4FPVfBdX3sQeaj12+OzO++jUZOwVlVA5wN2ETILVRbPTdDxSOxiRwvG X-Received: by 10.28.5.85 with SMTP id 82mr29978240wmf.26.1460024296049; Thu, 07 Apr 2016 03:18:16 -0700 (PDT) Received: from localhost.localdomain.com ([151.24.73.152]) by smtp.gmail.com with ESMTPSA id t8sm7713593wjy.41.2016.04.07.03.18.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Apr 2016 03:18:15 -0700 (PDT) From: Antonio Murdaca X-Google-Original-From: Antonio Murdaca To: linux-kernel@vger.kernel.org Cc: linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, miklos@szeredi.hu Subject: [PATCH] fs: overlayfs: remove debug parameter Date: Thu, 7 Apr 2016 12:18:12 +0200 Message-Id: <1460024292-24264-1-git-send-email-runcom@redhat.com> X-Mailer: git-send-email 2.5.5 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pr_debug is handling whether or not to print debug statements so drop the bool debug parameter. Signed-off-by: Antonio Murdaca --- fs/overlayfs/copy_up.c | 2 +- fs/overlayfs/dir.c | 18 +++++++++--------- fs/overlayfs/overlayfs.h | 31 +++++++++++-------------------- fs/overlayfs/super.c | 2 +- 4 files changed, 22 insertions(+), 31 deletions(-) diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c index cc514da..5117647 100644 --- a/fs/overlayfs/copy_up.c +++ b/fs/overlayfs/copy_up.c @@ -260,7 +260,7 @@ static int ovl_copy_up_locked(struct dentry *workdir, struct dentry *upperdir, /* Can't properly set mode on creation because of the umask */ stat->mode &= S_IFMT; - err = ovl_create_real(wdir, newdentry, stat, link, NULL, true); + err = ovl_create_real(wdir, newdentry, stat, link, NULL); stat->mode = mode; if (err) goto out2; diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c index b3fc0a3..91c481c 100644 --- a/fs/overlayfs/dir.c +++ b/fs/overlayfs/dir.c @@ -71,7 +71,7 @@ static struct dentry *ovl_whiteout(struct dentry *workdir, int ovl_create_real(struct inode *dir, struct dentry *newdentry, struct kstat *stat, const char *link, - struct dentry *hardlink, bool debug) + struct dentry *hardlink) { int err; @@ -79,15 +79,15 @@ int ovl_create_real(struct inode *dir, struct dentry *newdentry, return -ESTALE; if (hardlink) { - err = ovl_do_link(hardlink, dir, newdentry, debug); + err = ovl_do_link(hardlink, dir, newdentry); } else { switch (stat->mode & S_IFMT) { case S_IFREG: - err = ovl_do_create(dir, newdentry, stat->mode, debug); + err = ovl_do_create(dir, newdentry, stat->mode); break; case S_IFDIR: - err = ovl_do_mkdir(dir, newdentry, stat->mode, debug); + err = ovl_do_mkdir(dir, newdentry, stat->mode); break; case S_IFCHR: @@ -95,11 +95,11 @@ int ovl_create_real(struct inode *dir, struct dentry *newdentry, case S_IFIFO: case S_IFSOCK: err = ovl_do_mknod(dir, newdentry, - stat->mode, stat->rdev, debug); + stat->mode, stat->rdev); break; case S_IFLNK: - err = ovl_do_symlink(dir, newdentry, link, debug); + err = ovl_do_symlink(dir, newdentry, link); break; default: @@ -173,7 +173,7 @@ static int ovl_create_upper(struct dentry *dentry, struct inode *inode, err = PTR_ERR(newdentry); if (IS_ERR(newdentry)) goto out_unlock; - err = ovl_create_real(udir, newdentry, stat, link, hardlink, false); + err = ovl_create_real(udir, newdentry, stat, link, hardlink); if (err) goto out_dput; @@ -246,7 +246,7 @@ static struct dentry *ovl_clear_empty(struct dentry *dentry, if (IS_ERR(opaquedir)) goto out_unlock; - err = ovl_create_real(wdir, opaquedir, &stat, NULL, NULL, true); + err = ovl_create_real(wdir, opaquedir, &stat, NULL, NULL); if (err) goto out_dput; @@ -343,7 +343,7 @@ static int ovl_create_over_whiteout(struct dentry *dentry, struct inode *inode, if (IS_ERR(upper)) goto out_dput; - err = ovl_create_real(wdir, newdentry, stat, link, hardlink, true); + err = ovl_create_real(wdir, newdentry, stat, link, hardlink); if (err) goto out_dput2; diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 6a7090f..545b56b 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -42,51 +42,42 @@ static inline int ovl_do_unlink(struct inode *dir, struct dentry *dentry) } static inline int ovl_do_link(struct dentry *old_dentry, struct inode *dir, - struct dentry *new_dentry, bool debug) + struct dentry *new_dentry) { int err = vfs_link(old_dentry, dir, new_dentry, NULL); - if (debug) { - pr_debug("link(%pd2, %pd2) = %i\n", - old_dentry, new_dentry, err); - } + pr_debug("link(%pd2, %pd2) = %i\n", old_dentry, new_dentry, err); return err; } static inline int ovl_do_create(struct inode *dir, struct dentry *dentry, - umode_t mode, bool debug) + umode_t mode) { int err = vfs_create(dir, dentry, mode, true); - if (debug) - pr_debug("create(%pd2, 0%o) = %i\n", dentry, mode, err); + pr_debug("create(%pd2, 0%o) = %i\n", dentry, mode, err); return err; } static inline int ovl_do_mkdir(struct inode *dir, struct dentry *dentry, - umode_t mode, bool debug) + umode_t mode) { int err = vfs_mkdir(dir, dentry, mode); - if (debug) - pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, err); + pr_debug("mkdir(%pd2, 0%o) = %i\n", dentry, mode, err); return err; } static inline int ovl_do_mknod(struct inode *dir, struct dentry *dentry, - umode_t mode, dev_t dev, bool debug) + umode_t mode, dev_t dev) { int err = vfs_mknod(dir, dentry, mode, dev); - if (debug) { - pr_debug("mknod(%pd2, 0%o, 0%o) = %i\n", - dentry, mode, dev, err); - } + pr_debug("mknod(%pd2, 0%o, 0%o) = %i\n", dentry, mode, dev, err); return err; } static inline int ovl_do_symlink(struct inode *dir, struct dentry *dentry, - const char *oldname, bool debug) + const char *oldname) { int err = vfs_symlink(dir, dentry, oldname); - if (debug) - pr_debug("symlink(\"%s\", %pd2) = %i\n", oldname, dentry, err); + pr_debug("symlink(\"%s\", %pd2) = %i\n", oldname, dentry, err); return err; } @@ -192,7 +183,7 @@ extern const struct inode_operations ovl_dir_inode_operations; struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry); int ovl_create_real(struct inode *dir, struct dentry *newdentry, struct kstat *stat, const char *link, - struct dentry *hardlink, bool debug); + struct dentry *hardlink); void ovl_cleanup(struct inode *dir, struct dentry *dentry); /* copy_up.c */ diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 42c74bb..24a9801 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -801,7 +801,7 @@ retry: goto retry; } - err = ovl_create_real(dir, work, &stat, NULL, NULL, true); + err = ovl_create_real(dir, work, &stat, NULL, NULL); if (err) goto out_dput; }