Linux block layer
 help / color / mirror / Atom feed
* [PATCH] block: remove the call to file_remove_privs in blkdev_write_iter
@ 2023-08-31 12:19 Christoph Hellwig
  2023-08-31 12:23 ` Johannes Thumshirn
  2023-08-31 15:22 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2023-08-31 12:19 UTC (permalink / raw)
  To: axboe; +Cc: linux-block

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(-)

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;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-08-31 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31 12:19 [PATCH] block: remove the call to file_remove_privs in blkdev_write_iter Christoph Hellwig
2023-08-31 12:23 ` Johannes Thumshirn
2023-08-31 15:22 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox