From: ByeongGyu Jeon <ntnegm@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: ByeongGyu Jeon <ntnegm@gmail.com>
Subject: [PATCH] fs: read_write: fix coding style error
Date: Mon, 17 Jan 2022 21:05:28 +0900 [thread overview]
Message-ID: <20220117120528.2346-1-ntnegm@gmail.com> (raw)
Fixed coding style errors of fs/read_write.c
Signed-off-by: ByeongGyu Jeon <ntnegm@gmail.com>
---
fs/read_write.c | 74 ++++++++++++++++++++++++-------------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 0074afa7ecb3..160e3c7da473 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -240,39 +240,39 @@ loff_t default_llseek(struct file *file, loff_t offset, int whence)
inode_lock(inode);
switch (whence) {
- case SEEK_END:
- offset += i_size_read(inode);
- break;
- case SEEK_CUR:
- if (offset == 0) {
- retval = file->f_pos;
- goto out;
- }
- offset += file->f_pos;
- break;
- case SEEK_DATA:
- /*
- * In the generic case the entire file is data, so as
- * long as offset isn't at the end of the file then the
- * offset is data.
- */
- if (offset >= inode->i_size) {
- retval = -ENXIO;
- goto out;
- }
- break;
- case SEEK_HOLE:
- /*
- * There is a virtual hole at the end of the file, so
- * as long as offset isn't i_size or larger, return
- * i_size.
- */
- if (offset >= inode->i_size) {
- retval = -ENXIO;
- goto out;
- }
- offset = inode->i_size;
- break;
+ case SEEK_END:
+ offset += i_size_read(inode);
+ break;
+ case SEEK_CUR:
+ if (offset == 0) {
+ retval = file->f_pos;
+ goto out;
+ }
+ offset += file->f_pos;
+ break;
+ case SEEK_DATA:
+ /*
+ * In the generic case the entire file is data, so as
+ * long as offset isn't at the end of the file then the
+ * offset is data.
+ */
+ if (offset >= inode->i_size) {
+ retval = -ENXIO;
+ goto out;
+ }
+ break;
+ case SEEK_HOLE:
+ /*
+ * There is a virtual hole at the end of the file, so
+ * as long as offset isn't i_size or larger, return
+ * i_size.
+ */
+ if (offset >= inode->i_size) {
+ retval = -ENXIO;
+ goto out;
+ }
+ offset = inode->i_size;
+ break;
}
retval = -EINVAL;
if (offset >= 0 || unsigned_offsets(file)) {
@@ -693,7 +693,7 @@ ssize_t ksys_pwrite64(unsigned int fd, const char __user *buf,
f = fdget(fd);
if (f.file) {
ret = -ESPIPE;
- if (f.file->f_mode & FMODE_PWRITE)
+ if (f.file->f_mode & FMODE_PWRITE)
ret = vfs_write(f.file, buf, count, &pos);
fdput(f);
}
@@ -1137,7 +1137,7 @@ COMPAT_SYSCALL_DEFINE4(pwritev64, unsigned long, fd,
#endif
COMPAT_SYSCALL_DEFINE5(pwritev, compat_ulong_t, fd,
- const struct iovec __user *,vec,
+ const struct iovec __user *, vec,
compat_ulong_t, vlen, u32, pos_low, u32, pos_high)
{
loff_t pos = ((loff_t)pos_high << 32) | pos_low;
@@ -1157,7 +1157,7 @@ COMPAT_SYSCALL_DEFINE5(pwritev64v2, unsigned long, fd,
#endif
COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
- const struct iovec __user *,vec,
+ const struct iovec __user *, vec,
compat_ulong_t, vlen, u32, pos_low, u32, pos_high, rwf_t, flags)
{
loff_t pos = ((loff_t)pos_high << 32) | pos_low;
@@ -1169,7 +1169,7 @@ COMPAT_SYSCALL_DEFINE6(pwritev2, compat_ulong_t, fd,
#endif /* CONFIG_COMPAT */
static ssize_t do_sendfile(int out_fd, int in_fd, loff_t *ppos,
- size_t count, loff_t max)
+ size_t count, loff_t max)
{
struct fd in, out;
struct inode *in_inode, *out_inode;
--
2.17.1
--
이 이메일은 Avast 안티바이러스 소프트웨어로 바이러스 검사를 완료했습니다.
https://www.avast.com/antivirus
reply other threads:[~2022-01-17 12:05 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=20220117120528.2346-1-ntnegm@gmail.com \
--to=ntnegm@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).