diff mbox series

block: remove the call to file_remove_privs in blkdev_write_iter

Message ID 20230831121911.280155-1-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series block: remove the call to file_remove_privs in blkdev_write_iter | expand

Commit Message

Christoph Hellwig Aug. 31, 2023, 12:19 p.m. UTC
file_remove_privs instantly returns 0 when not called for regular files,
so don't bother.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/fops.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Johannes Thumshirn Aug. 31, 2023, 12:23 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Jens Axboe Aug. 31, 2023, 3:22 p.m. UTC | #2
On Thu, 31 Aug 2023 14:19:11 +0200, Christoph Hellwig wrote:
> file_remove_privs instantly returns 0 when not called for regular files,
> so don't bother.
> 
> 

Applied, thanks!

[1/1] block: remove the call to file_remove_privs in blkdev_write_iter
      (no commit info)

Best regards,
diff mbox series

Patch

diff --git a/block/fops.c b/block/fops.c
index a24a624d3bf71a..acff3d5d22d461 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;