Skip to content

Commit b778e1e

Browse files
author
Miklos Szeredi
committed
ovl: only pass ->ki_flags to ovl_iocb_to_rwf()
Next patch will want to pass a modified set of flags, so... Signed-off-by: Miklos Szeredi <[email protected]>
1 parent df820f8 commit b778e1e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/overlayfs/file.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,8 @@ static void ovl_file_accessed(struct file *file)
232232
touch_atime(&file->f_path);
233233
}
234234

235-
static rwf_t ovl_iocb_to_rwf(struct kiocb *iocb)
235+
static rwf_t ovl_iocb_to_rwf(int ifl)
236236
{
237-
int ifl = iocb->ki_flags;
238237
rwf_t flags = 0;
239238

240239
if (ifl & IOCB_NOWAIT)
@@ -296,7 +295,7 @@ static ssize_t ovl_read_iter(struct kiocb *iocb, struct iov_iter *iter)
296295
old_cred = ovl_override_creds(file_inode(file)->i_sb);
297296
if (is_sync_kiocb(iocb)) {
298297
ret = vfs_iter_read(real.file, iter, &iocb->ki_pos,
299-
ovl_iocb_to_rwf(iocb));
298+
ovl_iocb_to_rwf(iocb->ki_flags));
300299
} else {
301300
struct ovl_aio_req *aio_req;
302301

@@ -349,7 +348,7 @@ static ssize_t ovl_write_iter(struct kiocb *iocb, struct iov_iter *iter)
349348
if (is_sync_kiocb(iocb)) {
350349
file_start_write(real.file);
351350
ret = vfs_iter_write(real.file, iter, &iocb->ki_pos,
352-
ovl_iocb_to_rwf(iocb));
351+
ovl_iocb_to_rwf(iocb->ki_flags));
353352
file_end_write(real.file);
354353
/* Update size */
355354
ovl_copyattr(ovl_inode_real(inode), inode);

0 commit comments

Comments
 (0)