Fixed coding style errors of fs/read_write.c Signed-off-by: ByeongGyu Jeon <ntnegm@xxxxxxxxx> --- 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