From: Hugh Dickins <hughd@google.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jie Liu <jeff.liu@oracle.com>, Dave Chinner <david@fromorbit.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-kernel@vger.kernel.org
Subject: [PATCH] tmpfs: fix SEEK_DATA/SEEK_HOLE regression
Date: Sun, 4 Aug 2013 11:30:25 -0700 (PDT) [thread overview]
Message-ID: <alpine.LNX.2.00.1308041126360.1636@eggly.anvils> (raw)
Commit 46a1c2c7ae53 ("vfs: export lseek_execute() to modules")
broke the tmpfs SEEK_DATA/SEEK_HOLE implementation, because
vfs_setpos() converts the carefully prepared -ENXIO to -EINVAL.
Other filesystems avoid it in error cases: do the same in tmpfs.
Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/shmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 3.11-rc3/mm/shmem.c 2013-07-14 17:10:16.648003652 -0700
+++ linux/mm/shmem.c 2013-08-04 10:49:52.208372436 -0700
@@ -1798,7 +1798,8 @@ static loff_t shmem_file_llseek(struct f
}
}
- offset = vfs_setpos(file, offset, MAX_LFS_FILESIZE);
+ if (offset >= 0)
+ offset = vfs_setpos(file, offset, MAX_LFS_FILESIZE);
mutex_unlock(&inode->i_mutex);
return offset;
}
reply other threads:[~2013-08-04 18:30 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=alpine.LNX.2.00.1308041126360.1636@eggly.anvils \
--to=hughd@google.com \
--cc=david@fromorbit.com \
--cc=jeff.liu@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®