From patchwork Thu Dec 5 10:39:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ritesh Harjani X-Patchwork-Id: 11274631 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C6FA14BD for ; Thu, 5 Dec 2019 10:39:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 244152465C for ; Thu, 5 Dec 2019 10:39:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729096AbfLEKjN (ORCPT ); Thu, 5 Dec 2019 05:39:13 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:31026 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728707AbfLEKjN (ORCPT ); Thu, 5 Dec 2019 05:39:13 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB5Ac7QO010175 for ; Thu, 5 Dec 2019 05:39:12 -0500 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2wpuqc3ahh-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 05 Dec 2019 05:39:12 -0500 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 5 Dec 2019 10:39:10 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 5 Dec 2019 10:39:07 -0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id xB5Ad6JO65732634 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Dec 2019 10:39:06 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67382A405C; Thu, 5 Dec 2019 10:39:06 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6D686A4054; Thu, 5 Dec 2019 10:39:04 +0000 (GMT) Received: from dhcp-9-199-159-163.in.ibm.com (unknown [9.199.159.163]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 5 Dec 2019 10:39:04 +0000 (GMT) From: Ritesh Harjani To: willy@infradead.org, linux-fsdevel@vger.kernel.org, jlayton@kernel.org, viro@zeniv.linux.org.uk Cc: ceph-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-nfs@vger.kernel.org, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, Ritesh Harjani Subject: [PATCH 0/1] Use inode_lock/unlock class of provided APIs in filesystems Date: Thu, 5 Dec 2019 16:09:01 +0530 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19120510-0020-0000-0000-0000039440D3 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19120510-0021-0000-0000-000021EB6D6B Message-Id: <20191205103902.23618-1-riteshh@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-05_02:2019-12-04,2019-12-05 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 adultscore=0 mlxscore=0 priorityscore=1501 mlxlogscore=361 bulkscore=0 lowpriorityscore=0 clxscore=1011 suspectscore=0 impostorscore=0 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-1912050087 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Matthew Wilcox in [1] suggested that it will be a good idea to define some missing API instead of directly using i_rwsem in filesystems drivers for lock/unlock/downgrade purposes. This patch does that work. No functionality change in this patch. After this there are only lockdep class of APIs at certain places in filesystems which are directly using i_rwsem and second is XFS, but it seems to be anyway defining it's own xfs_ilock/iunlock set of APIs and 'iolock' naming convention for this lock. [1]: https://www.spinics.net/lists/linux-ext4/msg68689.html Ritesh Harjani (1): fs: Use inode_lock/unlock class of provided APIs in filesystems fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/ioctl.c | 4 ++-- fs/ceph/io.c | 24 ++++++++++++------------ fs/nfs/io.c | 24 ++++++++++++------------ fs/orangefs/file.c | 4 ++-- fs/overlayfs/readdir.c | 2 +- fs/readdir.c | 4 ++-- include/linux/fs.h | 21 +++++++++++++++++++++ 8 files changed, 53 insertions(+), 32 deletions(-)