block: remove the call to file_remove_privs in blkdev_write_iter
authorChristoph Hellwig <hch@lst.de>
Thu, 31 Aug 2023 12:19:11 +0000 (14:19 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 31 Aug 2023 14:00:23 +0000 (08:00 -0600)
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>
block/fops.c

index a24a624..acff3d5 100644 (file)
@@ -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;