Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp4092064rdh; Fri, 29 Sep 2023 10:47:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYAa/tI/3sF1DutrQX7TjUqvkefdZASiNDn+jTveWEwnPwGWQwN0mGwqdaq6/zI375Oo8a X-Received: by 2002:a05:6830:3d0c:b0:6be:fd51:cb6d with SMTP id eu12-20020a0568303d0c00b006befd51cb6dmr5208853otb.31.1696009650430; Fri, 29 Sep 2023 10:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696009650; cv=none; d=google.com; s=arc-20160816; b=ifUTbvs5z+hxqZMxOOZYEO4zoP9n9U8509Msq/laV+05dcmB+7fJQLWful4v0miIjD U02dV29x888hZbbzbJFdVYnijuhsis12j5Ag0PWGgSrI+TMwFRT4lduLKqrN4F5DOuqc LJGTC2EAtfBjicKSFxkgxXL7MINpGVNfjbGz6STc8pj3y46brNMa4d0wnEx0CQq1mMoo d5DjeFkbLsJ3vdkKKaqp5wmLUWtIz6mDAEoCdx5mNNeZYAe0R0bAE99UZXUn3mZL/p6n EIySTcDYvxq+1eRGbGRXKhZ7S2stoqsKJD8uWWwo0LaNZLzSBCsAm4s+grTxJXVD7K58 OeJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ZUz+kF8Pedp7t3BD5RZV/Kj+gKF1bVi7dZrt5sygFuw=; fh=efTgoK6F+5tNVOMJ97DeI9aRtt2jscv7ChgmaMmIghg=; b=d++XES2whET1o5Qh1/6+dWQe6/9t8bvCCJ9JcZuI4iwK4T2mbZ2uTaY/gs1EDFWDP0 ZlJ42JUQUzBfQW/Iu+Ye1OT8KqzJfijg2Bd9hSFZj+QQxC+8gD41CEoiuImwYlxYyq3v rfJj2I0UBpadEi8chLtcO8kPzjMqT/WuT/vpAO5nM6iSVA0hJQskfEKCU2W5m+sIWFYf 1YucbhrM+eiCPDdqrZsfUlwTlGuRkRVnzjTfSMQN1bKnchu6FgLCAA5cA3xDS0LAL+lm 87l2KmXXUu2BP2x7p/K+9iNSfEK3H7Smb/Ks54h8KkzEU8er9+XXpw5GvFqy+SRimUDc KGFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z++OBank; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id n13-20020a65488d000000b00578ed63fdacsi21648856pgs.878.2023.09.29.10.47.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 10:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Z++OBank; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C0B74804B294; Fri, 29 Sep 2023 10:25:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232800AbjI2RZn (ORCPT + 99 others); Fri, 29 Sep 2023 13:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232985AbjI2RZm (ORCPT ); Fri, 29 Sep 2023 13:25:42 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E07219F for ; Fri, 29 Sep 2023 10:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696008295; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ZUz+kF8Pedp7t3BD5RZV/Kj+gKF1bVi7dZrt5sygFuw=; b=Z++OBankya8wTalneonlYZCuz5QA9IFiU3P08O/Q0/8e7rrCr2thpS+wUGrt3rtr6POOMz CW633yD4A16yd3EkH2gy/rx2TW+ExyErDgMirtuvclVA1zB/NZWQqz7eAH0PNj/FdeU7Uq /ZMfcA+LIWkDwFM1XPLLexIz848YqB0= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-28-64Qgg6aSOcS18hEWA1bRmg-1; Fri, 29 Sep 2023 13:24:54 -0400 X-MC-Unique: 64Qgg6aSOcS18hEWA1bRmg-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-65af7b636easo195414166d6.0 for ; Fri, 29 Sep 2023 10:24:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696008294; x=1696613094; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZUz+kF8Pedp7t3BD5RZV/Kj+gKF1bVi7dZrt5sygFuw=; b=nZ2Shkr7EtFku/PjBzw7IeJeTeQ9hnljlb+Rlap1QNfeoTvopoYRYQJl1YAgeR8Rdr bgt/UKVu0X1wwrF/573CDE0/xuXOY+c97Q2dd7IhJIioNNk5pPYuB9oGN9L1NakQ7jEw 0ReV9N0kXwJSTo4/GsGTrOeElOgVO3c9hG0/hcLBuLOWDOlpbOfqnDm4nweZdZ1Py9xs +PDd+cVOiO8o69WOvm18NvIM9y6WmirqMRZu1XCI4XOhlEFxD+sqZLFIPrXE2kXzqqCD jS1IebHK5DbGlls0zK7aJ38K6xq+IOjFwdIH0Iq3Lo0p+5jeW463RE0Rp+I5KLnZglnC Jv1w== X-Gm-Message-State: AOJu0YypDsOz/fstgZnISgbjVW46kiNfNDKcbTLSQAtU00s69k+l6d5g 70dY7f0GU75RW9q4kixECVDDdumsNx3Adii1K61PRB8PXnDxnakpC2/nxJZEB7tVomL+xQq34fW qr4qltBr8GmEfQ4zEJzUVnA== X-Received: by 2002:a05:6214:3381:b0:65d:179:44ef with SMTP id mv1-20020a056214338100b0065d017944efmr5303007qvb.33.1696008293879; Fri, 29 Sep 2023 10:24:53 -0700 (PDT) X-Received: by 2002:a05:6214:3381:b0:65d:179:44ef with SMTP id mv1-20020a056214338100b0065d017944efmr5302994qvb.33.1696008293641; Fri, 29 Sep 2023 10:24:53 -0700 (PDT) Received: from bfoster (c-24-60-61-41.hsd1.ma.comcast.net. [24.60.61.41]) by smtp.gmail.com with ESMTPSA id a14-20020a0cca8e000000b0065af71585b5sm2750585qvk.58.2023.09.29.10.24.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 10:24:53 -0700 (PDT) Date: Fri, 29 Sep 2023 13:25:08 -0400 From: Brian Foster To: syzbot Cc: linux-ext4@vger.kernel.org, syzkaller-bugs@googlegroups.com Subject: Re: [syzbot] [ext4?] WARNING in ext4_iomap_begin (2) Message-ID: References: <0000000000005697bd05fe4aea49@google.com> <0000000000003a874b06067b1d4d@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0000000000003a874b06067b1d4d@google.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 29 Sep 2023 10:25:53 -0700 (PDT) #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 6830ea3a6c59..cad659c2e9cc 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c @@ -537,6 +537,9 @@ static ssize_t ext4_dio_write_iter(struct kiocb *iocb, struct iov_iter *from) bool ilock_shared = true; int dio_flags = 0; + if (ext4_test_inode_state(inode, EXT4_STATE_MAY_INLINE_DATA)) + ilock_shared = false; + /* * Quick check here without any i_rwsem lock to see if it is extending * IO. A more reliable check is done in ext4_dio_write_checks() with