From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.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 3C7DA407579 for ; Fri, 12 Jun 2026 16:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781283146; cv=none; b=Ae8BbVODBbYtwnPp3N3xrnLLGqw5atBk0J8SttRhFoyDPf3UkK3k6GQdMk7PWMcDGihi14nuVCLsfdMPZrZF/8QOxFPD1pIHY2+w7Sk/r4/cutJw/tZ0uWTMlk2aei0bf0aVSzgHfqHJHANwiOepoWXPqIl7+6HYcLWV+93gHdc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781283146; c=relaxed/simple; bh=Rf4UB8v0iThmvij98UlaQfZ5ZsB3+D2Q0z/hidO1xUk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HIrK2+hgIl0mDnBit/JW55rzzdq08gRVYt8Qy62kZeHxBckTJHQm0WTUYU5sKrZJOwBM1kGe5hnOCQjz4LoLR4fPhJ3NivAwgP00ADE0WwLkxl7MzLtkisj3z39Q/x+83e5KoZuLl9XH+LyvWPiHu+OT1O8aAM73rLXBV0PfrZw= 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=AolOmcKx; arc=none smtp.client-ip=209.85.128.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="AolOmcKx" Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-490be03d47bso12771535e9.0 for ; Fri, 12 Jun 2026 09:52:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ionos.com; s=google; t=1781283143; x=1781887943; 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; bh=wFYPGnV9JZG8KG8wwu/dAxGKjUjQJd7Q3DIzzqa6rG0=; b=AolOmcKx5uS1nX7J0Mq7LRAahMdg4VErFHQHkLRZzIUxubRugYm3qiRzp5Un7ZWEGP 8+3cMCR1G3bjwb3reEgUX8jR9/K3QKnYIXD0u3ApLrUR8T5+59pWk7fANxz6jthgeOOq PcjapYEL9FQfmS7xr9Mg2FKOkzmZJv2cieVejMvIfjvlAJllmLayrvdFd+SMPVLW66lu 17BRB8Da1k+W+hvIyOGWomY+sjbd0q7iyBqtVcuonPoVKBxqvI4mxMv0O6my8/wPU+hD HAIzJfttevd3gAxY7Rta1xoV6RnuQ474BlJLwYRqTw/p8dc9FqX8zhj7pVWRdLX8FnDB tWxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781283143; x=1781887943; 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; bh=wFYPGnV9JZG8KG8wwu/dAxGKjUjQJd7Q3DIzzqa6rG0=; b=Cb80WmYiSAEZnNJTkSvqoGwu0BH6UIerDpgBZQokiFBZydZnNvg8daYZCtpOy/H0DW tp1RjpnO5W0qG1KhV6fi+qANa8ZlsH5+JSiZICSws0GrGx/CfXaHl8Y//FtcfOuEoMea 3s7yS4F/V2QcdHT2VQZ7hqPcLYXYlbAIE2uEfJAUPdczzNIeF7/SVedEmlarCLqWFdCV eqHc3zPg1RBcLGNvequjBZtISP5koJiUNAcyMTxxC9SZgUKt9GTUlLQHr+UW7MTokrQT 6pSuLa+cOOcvv5WL1DARvQbICE/pv81DHBrkJk0adg+0MPPI4g9Pw+oOIKWE4qzSsPQJ qH0A== X-Forwarded-Encrypted: i=1; AFNElJ/U0qQz1CaIke+KxPMrWhGRVj0A6XRyhFRx7dbvEGeSRk/RbQc4J6n+35Tjzfqlm3BubnZwr+9ctdUACSI=@vger.kernel.org X-Gm-Message-State: AOJu0YzQ6Z55otg5LHIFgK3971k8+cOZ2P2aV8jrpHR+a7CH3lZ96BYc jcA9ml77vVtpQyGmxN6V0w1j5qrPKyzQdXpiixhSGRE6sK0vSFQjwUgZPEuzue0ekMM= X-Gm-Gg: Acq92OGUrL+PTTmQlKpJLFjraop9syzN858nHxzJYFs7BEtLaJyCn0VV5YI/AteCfoF k0D8+4jk7QbUKTxL34WFIaY/Ne1V5tRUgMo7wMxN9KQJ44b2ZsDOJvAAheK6PLfsIsiHDAyLZsv /psk/bP0P6g1nKgHfhCS25SRjqAhvDUV4m3pfLnvjImNVYioYOoQ5BUxOLrRkOc1UYF7Vu9tN1p ePg4sj9qE7Ncvyw95HmM0+lRDAYyDh2aoyUhzAzh+XsOBVDwevAGpqafLrUydO28xROs6NcqHDu PniSHvTDQxIxnWphP8VrP3T9iYpqnFWwKPrypalDibHJ1Bgv+3b92gOw95ABdhV6Km9drSgdYt5 dV0i2nTBV2bAaPcruuD1O2l6aXr4fRC8QBr0nfc6E2jzyqPwfRQM3kkaaiAWafb9Vg85yCJXI27 WBZxZ+FfNSJPpH89fjOwZj5dpwZfGMdeQ5q/y3ZL/2Pv/OUnF1iYTCCbagxAtMpVTz4UM93OYZK YOPkPaiP5HSf+0uwAmWywvsDyc= X-Received: by 2002:a05:6000:220d:b0:45e:d6b2:e6a5 with SMTP id ffacd0b85a97d-4606dbd7834mr5528708f8f.34.1781283142655; Fri, 12 Jun 2026 09:52:22 -0700 (PDT) Received: from raven.intern.cm-ag (p200300dc6f45eb00023064fffe740809.dip0.t-ipconnect.de. [2003:dc:6f45:eb00:230:64ff:fe74:809]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4606f26f1cdsm7807377f8f.11.2026.06.12.09.52.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2026 09:52:22 -0700 (PDT) From: Max Kellermann To: idryomov@gmail.com, amarkuze@redhat.com, ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Max Kellermann Subject: [PATCH 09/12] fs/ceph/super.h: add `const` to helpers Date: Fri, 12 Jun 2026 18:52:01 +0200 Message-ID: <20260612165204.86137-10-max.kellermann@ionos.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260612165204.86137-1-max.kellermann@ionos.com> References: <20260612165204.86137-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 19f26724b285..b1d38fa6647f 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -581,7 +581,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); @@ -591,12 +591,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; } @@ -810,7 +810,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); } @@ -1068,7 +1068,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, @@ -1165,7 +1165,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); @@ -1349,7 +1349,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 */ @@ -1424,7 +1424,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; @@ -1457,7 +1457,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