Skip to content

Commit

Permalink
block: remove the call to file_remove_privs in blkdev_write_iter
Browse files Browse the repository at this point in the history
file_remove_privs instantly returns 0 when not called for regular files,
so don't bother.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20230831121911.280155-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Aug 31, 2023
1 parent eead005 commit 0d997f1
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions block/fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -671,10 +671,6 @@ static ssize_t blkdev_write_iter(struct kiocb *iocb, struct iov_iter *from)
iov_iter_truncate(from, size);
}

ret = file_remove_privs(file);
if (ret)
return ret;

ret = file_update_time(file);
if (ret)
return ret;
Expand Down

0 comments on commit 0d997f1

Please sign in to comment.