From: Christoph Hellwig Date: Thu, 31 Aug 2023 12:19:11 +0000 (+0200) Subject: block: remove the call to file_remove_privs in blkdev_write_iter X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0d997f1de89970bff4be1b6f0142c0bd036c3ee8;p=linux.git block: remove the call to file_remove_privs in blkdev_write_iter file_remove_privs instantly returns 0 when not called for regular files, so don't bother. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Link: https://lore.kernel.org/r/20230831121911.280155-1-hch@lst.de Signed-off-by: Jens Axboe --- diff --git a/block/fops.c b/block/fops.c index a24a624d3bf71..acff3d5d22d46 100644 --- a/block/fops.c +++ b/block/fops.c @@ -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;