From mboxrd@z Thu Jan 1 00:00:00 1970 From: Artem Bityutskiy Subject: Re: [PATCH v2] mtd: Do not corrupt backing device of device node inode Date: Wed, 05 May 2010 09:04:16 +0300 Message-ID: <1273039456.3702.59.camel@localhost> References: <1272922368-18517-1-git-send-email-kirill@shutemov.name> Reply-To: dedekind1@gmail.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: David Woodhouse , Jan Kara , Alexander Viro , David Howells , Alexander Shishkin , linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: "Kirill A. Shutemov" Return-path: In-Reply-To: <1272922368-18517-1-git-send-email-kirill@shutemov.name> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Tue, 2010-05-04 at 00:32 +0300, Kirill A. Shutemov wrote: > We cannot modify file->f_mapping->backing_dev_info, because it will c= orrupt > backing device of device node inode, since file->f_mapping is equal t= o > inode->i_mapping (see __dentry_open() in fs/open.c). >=20 > Let's introduce separate inode for MTD device with appropriate backin= g > device. >=20 > Signed-off-by: Kirill A. Shutemov >=20 > --- > Changelog v1 -> v2: > - Fix error handling based on comments by Jan Kara. How about a version of this patch which applies to the mtd-2.6 tree git://git.infradead.org/mtd-2.6.git (webview: http://git.infradead.org/mtd-2.6.git) This one does not apply: [dedekind@eru mtd-2.6]$ git am ~/tmp/k Applying: mtd: Do not corrupt backing device of device node inode error: patch failed: drivers/mtd/mtdchar.c:954 error: drivers/mtd/mtdchar.c: patch does not apply error: patch failed: drivers/mtd/mtdcore.c:383 error: drivers/mtd/mtdcore.c: patch does not apply Patch failed at 0001 mtd: Do not corrupt backing device of device node inode When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [dedekind@eru mtd-2.6]$ patch -p1 < .git/rebase-apply/patch=20 patching file drivers/mtd/mtdchar.c Hunk #2 succeeded at 88 (offset -3 lines). Hunk #3 succeeded at 119 (offset -3 lines). Hunk #4 succeeded at 145 (offset -3 lines). Hunk #5 FAILED at 979. 1 out of 5 hunks FAILED -- saving rejects to file drivers/mtd/mtdchar.c.rej patching file drivers/mtd/mtdcore.c Hunk #1 FAILED at 383. 1 out of 1 hunk FAILED -- saving rejects to file drivers/mtd/mtdcore.c.rej patching file include/linux/mtd/mtd.h Hunk #2 succeeded at 175 (offset -3 lines). --=20 Best Regards, Artem Bityutskiy (=D0=90=D1=80=D1=82=D1=91=D0=BC =D0=91=D0=B8=D1=82=D1=8E= =D1=86=D0=BA=D0=B8=D0=B9)