mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] staging: lustre: libcfs: use octal permissions
@ 2017-01-24 17:40 Ernestas Kulik
  2017-01-24 17:40 ` [PATCH 2/2] staging: lustre: llite: " Ernestas Kulik
  2017-01-24 22:22 ` [PATCH 1/2] staging: lustre: libcfs: " Dilger, Andreas
  0 siblings, 2 replies; 4+ messages in thread
From: Ernestas Kulik @ 2017-01-24 17:40 UTC (permalink / raw)
  To: oleg.drokin
  Cc: andreas.dilger, jsimmons, gregkh, lustre-devel, devel, linux-kernel

Using octal permissions instead of symbolic ones is preferred.

Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
---
 drivers/staging/lustre/lnet/libcfs/module.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c
index 161e04226521..c388550c2d10 100644
--- a/drivers/staging/lustre/lnet/libcfs/module.c
+++ b/drivers/staging/lustre/lnet/libcfs/module.c
@@ -488,10 +488,10 @@ static const struct file_operations lnet_debugfs_file_operations_wo = {
 
 static const struct file_operations *lnet_debugfs_fops_select(umode_t mode)
 {
-	if (!(mode & S_IWUGO))
+	if (!(mode & 0222))
 		return &lnet_debugfs_file_operations_ro;
 
-	if (!(mode & S_IRUGO))
+	if (!(mode & 0444))
 		return &lnet_debugfs_file_operations_wo;
 
 	return &lnet_debugfs_file_operations_rw;
-- 
2.11.0

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

end of thread, other threads:[~2017-01-25  2:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-24 17:40 [PATCH 1/2] staging: lustre: libcfs: use octal permissions Ernestas Kulik
2017-01-24 17:40 ` [PATCH 2/2] staging: lustre: llite: " Ernestas Kulik
2017-01-24 22:22 ` [PATCH 1/2] staging: lustre: libcfs: " Dilger, Andreas
2017-01-25  2:23   ` Joe Perches

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

Powered by JetHome