From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4151338B7BA for ; Mon, 24 Aug 2026 18:42:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787596939; cv=none; b=cmBkEkGGLxVCVvSA/HAZyOVnD48BDAYb/gSkQOueRE+XgPntJsxFTgThmqgdH1QVutnBUTmehQgRh18a7KEnJoiTsObjnWUYG8zqDdy+uVPJ/71X1GWdhdBB1pzc4hSlkPPRmj+ltivUvVEr7KK7k1BwJBweCbqbicy2374zs+8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787596939; c=relaxed/simple; bh=8f4/Y9OGi6UWa4fmkrLPrmDMstvmz81JVDu3GHRUtMw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H8RpQiyh2vWb4eKrlKcIYDPxhCpDSDZ+i4v2P3ReRDwIaxb0TNQTtM/EatrkAG7n+5NaUqmrh6Rd5zrfrqcslKztBrJ+YtX9EdKy4v/bqo1ZYiWnE+IxjP8EFoiMjQudHbOd4MmguB1VDyphGJ6821Qv5w37q7uitV/28zxcfSU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ionos.com; spf=pass smtp.mailfrom=ionos.com; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b=GVnWcjp/; arc=none smtp.client-ip=209.85.218.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=ionos.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ionos.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ionos.com header.i=@ionos.com header.b="GVnWcjp/" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-c15d47266baso444876366b.3 for ; Mon, 24 Aug 2026 11:42:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1787596935; x=1788201735; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5tCkqN5jp8QCX/lQSQpuYbF6YkmDquhi+IixAaPDZQM=; b=GVnWcjp/wJFz05hYpRU61nsvL1YPYosgxKisBKPqhpPkbh9eWi2Ia529GMpXhZ2liH q3xaQMorgxsmQmuJkC8pubFYzz1io4Z7O2VeoPRJSDFqaoLEC+T0E7uNIeZWw7f9vIJd pU3ucNJcWrBPtR+lsGH98It4fDh57+UIRG/jA/1we/IqOMEYJS/FshulffXSjhMdC45P ueB4P0aVmcWj4hPRdN5PnQmEzXB0kG7JMLQ9XOOUWsXxUYYl8ngMEp+GGllQm6YQQvBz +ms/utIoMVvRnvXU1YvdpIN1CAyv1T1PFhy/W9Z7rlVaBKvNRX9SaHux9zEvwOChg7lp R6DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787596935; x=1788201735; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=5tCkqN5jp8QCX/lQSQpuYbF6YkmDquhi+IixAaPDZQM=; b=IIklvQdUmaNISFJQbGnihCBdL5INh+YPd2tJHi3Jz+/17BSKosOaa6KRgww2Rfbtos 0Pqg0f1xmWxpQRaI2yshjCcPImisZQk2aop0uBwbwL73oIIbfmGbFj2iDtQQZc9AQ+I5 3CiOiV5MXqpCjCSMzX4E69I/ZDaXTx8rw9FCD7heIUt2ArhAVcQImgSXuPh0WYV6lzW8 3J58rCdbPetUfT1hJOAQnLZtWW+b6RXpJbQSQIVIYBVBXd0K2xt5znKvmrLmVsfYNF5X dJdFPs280bIEJfOenMkd8iEOi90gajwzrPZ/r9rtewpjYV7FutpZAzWFY5d9hmkp635D 7eHA== X-Forwarded-Encrypted: i=1; AHgh+Rpo/jM1qZAZ3s91N1Wka4UeWtCtlzbfMCKPcCoM+N8UMmb0psOypJYBpYVoHrC4EUJBMA3m+YCDlPyQ5ag=@vger.kernel.org X-Gm-Message-State: AFuF++nd1y2Oo1a0rBTTODdqJSxl9vM1mb7s0FXR4NCixTXKHZMmCgQt KdBF2+S9E1hWmqoF8s9HBBjGEPJt/st2Kd1sSNwHwx9M2Ln6qW1Hl2YhZYnz8DyAx20= X-Gm-Gg: AR+sD12uIf6cevAx1dsL36VCsYbS8OiUJsubFDx1pUlGdHDz72hB/mzYOb6DiHkli0l vXO8+lgJMb3N2CJlabmsrc+MP7j6+2NeVMK/mYN007XLj5vaSqZsRqJSqKybb3pqZYGmH8g2imd ETTYMxT/ZnOW9v82iIc0GKlVPNGSA4ol7dSh6kVP7W8R2klnTRFhSObvDYtEReC8cZVY2VL/UqA j+TazL6YK6jUaG26046r2S7oN5ByLMIQmxMcVeWhg67qFvWPEWB2pzbGRwOu5eMmBaVKwXHuP2A YKZPvsEdCa25k4UA9Ewb6P2Th5TmsXdIZen776DKuISyYO4w15WBAmBKtW+hoRW2/9720uTMJF8 yR69LRfjiggh8bIfPFcymoVgmGgaBlI6+nbP3NjW0VlSLhtFUpCNuboFTpwQvxqsiV9RDVpfI1r qpALlrAN1ILlWxqnJ/I6EaSHVWtsZLW6TjUFZhRDTyQlhmnuvd02vFiRaXlf7pPHjl3taRD+nZ1 r+TQLTcbzIEKvo2+v7WDKFLaBbqlY9qhk2PGGVumui/QlSAHHJzd2LuxF0kX1k0 X-Received: by 2002:a17:907:728b:b0:c24:c250:a6b5 with SMTP id a640c23a62f3a-c24e5ae23b9mr36253966b.12.1787596934652; Mon, 24 Aug 2026 11:42:14 -0700 (PDT) Received: from raven.intern.cm-ag (p200300dc6f02b200023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f02:b200:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c249606a8fasm1533526066b.8.2026.08.24.11.42.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2026 11:42:14 -0700 (PDT) From: Max Kellermann To: idryomov@gmail.com, amarkuze@redhat.com, xiubo.li@clyso.com, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH v5 08/11] fs/ceph/super.h: add `const` to helpers Date: Mon, 24 Aug 2026 20:41:56 +0200 Message-ID: <20260824184159.240821-9-max.kellermann@ionos.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260824184159.240821-1-max.kellermann@ionos.com> References: <20260824184159.240821-1-max.kellermann@ionos.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This documents that these functions do not modify the parameters. Signed-off-by: Max Kellermann --- fs/ceph/super.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/ceph/super.h b/fs/ceph/super.h index beb7009f793c..4b2a1568000f 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -589,7 +589,7 @@ static inline u32 ceph_ino_to_ino32(u64 vino) * we do want to set it to something, so that generic vfs code has an * appropriate value for tracepoints and the like. */ -static inline ino_t ceph_vino_to_ino_t(struct ceph_vino vino) +static inline ino_t ceph_vino_to_ino_t(const struct ceph_vino vino) { if (sizeof(ino_t) == sizeof(u32)) return ceph_ino_to_ino32(vino.ino); @@ -599,12 +599,12 @@ static inline ino_t ceph_vino_to_ino_t(struct ceph_vino vino) /* for printf-style formatting */ #define ceph_vinop(i) ceph_inode(i)->i_vino.ino, ceph_inode(i)->i_vino.snap -static inline u64 ceph_ino(struct inode *inode) +static inline u64 ceph_ino(const struct inode *inode) { return ceph_inode(inode)->i_vino.ino; } -static inline u64 ceph_snap(struct inode *inode) +static inline u64 ceph_snap(const struct inode *inode) { return ceph_inode(inode)->i_vino.snap; } @@ -819,7 +819,7 @@ static inline struct ceph_dentry_info *ceph_dentry(const struct dentry *dentry) /* * caps helpers */ -static inline bool __ceph_is_any_real_caps(struct ceph_inode_info *ci) +static inline bool __ceph_is_any_real_caps(const struct ceph_inode_info *ci) { return !RB_EMPTY_ROOT(&ci->i_caps); } @@ -1077,7 +1077,7 @@ void ceph_umount_begin(struct super_block *sb); * a cap_snap is "pending" if it is still awaiting an in-progress * sync write (that may/may not still update size, mtime, etc.). */ -static inline bool __ceph_have_pending_cap_snap(struct ceph_inode_info *ci) +static inline bool __ceph_have_pending_cap_snap(const struct ceph_inode_info *ci) { return !list_empty(&ci->i_cap_snaps) && list_last_entry(&ci->i_cap_snaps, struct ceph_cap_snap, @@ -1174,7 +1174,7 @@ extern int ceph_getattr(struct mnt_idmap *idmap, u32 request_mask, unsigned int flags); void ceph_inode_shutdown(struct inode *inode); -static inline bool ceph_inode_is_shutdown(struct inode *inode) +static inline bool ceph_inode_is_shutdown(const struct inode *inode) { unsigned long flags = READ_ONCE(ceph_inode(inode)->i_ceph_flags); struct ceph_fs_client *fsc = ceph_inode_to_fs_client(inode); @@ -1358,7 +1358,7 @@ extern int ceph_pool_perm_check(struct inode *inode, int need); extern void ceph_pool_perm_destroy(struct ceph_mds_client* mdsc); int ceph_purge_inode_cap(struct inode *inode, struct ceph_cap *cap, bool *invalidate); -static inline bool ceph_has_inline_data(struct ceph_inode_info *ci) +static inline bool ceph_has_inline_data(const struct ceph_inode_info *ci) { if (ci->i_inline_version == CEPH_INLINE_NONE || ci->i_inline_version == 1) /* initial version, no data */ @@ -1433,7 +1433,7 @@ enum quota_get_realm { QUOTA_GET_ANY }; -static inline bool __ceph_has_quota(struct ceph_inode_info *ci, +static inline bool __ceph_has_quota(const struct ceph_inode_info *ci, enum quota_get_realm which) { bool has_quota = false; @@ -1466,7 +1466,7 @@ static inline void __ceph_update_quota(struct ceph_inode_info *ci, ceph_adjust_quota_realms_count(&ci->netfs.inode, has_quota); } -static inline int __ceph_sparse_read_ext_count(struct inode *inode, u64 len) +static inline int __ceph_sparse_read_ext_count(const struct inode *inode, u64 len) { int cnt = 0; -- 2.47.3