From: akpm@linux-foundation.org
To: fabf@skynet.be, mm-commits@vger.kernel.org, viro@zeniv.linux.org.uk
Subject: [merged] fs-affs-bugfix-enable-writes-on-ofs-disks.patch removed from -mm tree
Date: Mon, 01 May 2017 12:20:57 -0700 [thread overview]
Message-ID: <20170501192057.7YU8DZ07u%akpm@linux-foundation.org> (raw)
The patch titled
Subject: fs/affs: bugfix: enable writes on OFS disks
has been removed from the -mm tree. Its filename was
fs-affs-bugfix-enable-writes-on-ofs-disks.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Fabian Frederick <fabf@skynet.be>
Subject: fs/affs: bugfix: enable writes on OFS disks
We called unconditionally affs_bread_ino() with create 0 resulting in
"error (device ...): get_block(): strange block request 0" when trying to
write on AFFS OFS format.
This patch adds create parameter to that function.
0 for affs_readpage_ofs()
1 for affs_write_begin_ofs()
Bug was found here:
https://bugzilla.kernel.org/show_bug.cgi?id=114961
Link: http://lkml.kernel.org/r/20170424201257.1575-1-fabf@skynet.be
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/affs/file.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -puN fs/affs/file.c~fs-affs-bugfix-enable-writes-on-ofs-disks fs/affs/file.c
--- a/fs/affs/file.c~fs-affs-bugfix-enable-writes-on-ofs-disks
+++ a/fs/affs/file.c
@@ -499,7 +499,7 @@ affs_getemptyblk_ino(struct inode *inode
}
static int
-affs_do_readpage_ofs(struct page *page, unsigned to)
+affs_do_readpage_ofs(struct page *page, unsigned to, int create)
{
struct inode *inode = page->mapping->host;
struct super_block *sb = inode->i_sb;
@@ -518,7 +518,7 @@ affs_do_readpage_ofs(struct page *page,
boff = tmp % bsize;
while (pos < to) {
- bh = affs_bread_ino(inode, bidx, 0);
+ bh = affs_bread_ino(inode, bidx, create);
if (IS_ERR(bh))
return PTR_ERR(bh);
tmp = min(bsize - boff, to - pos);
@@ -620,7 +620,7 @@ affs_readpage_ofs(struct file *file, str
memset(page_address(page) + to, 0, PAGE_SIZE - to);
}
- err = affs_do_readpage_ofs(page, to);
+ err = affs_do_readpage_ofs(page, to, 0);
if (!err)
SetPageUptodate(page);
unlock_page(page);
@@ -657,7 +657,7 @@ static int affs_write_begin_ofs(struct f
return 0;
/* XXX: inefficient but safe in the face of short writes */
- err = affs_do_readpage_ofs(page, PAGE_SIZE);
+ err = affs_do_readpage_ofs(page, PAGE_SIZE, 1);
if (err) {
unlock_page(page);
put_page(page);
_
Patches currently in -mm which might be from fabf@skynet.be are
reply other threads:[~2017-05-01 19:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170501192057.7YU8DZ07u%akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.