]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: libcfs: use octal permissions
authorErnestas Kulik <ernestas.kulik@gmail.com>
Tue, 24 Jan 2017 17:40:49 +0000 (19:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jan 2017 08:40:56 +0000 (09:40 +0100)
Using octal permissions instead of symbolic ones is preferred.

Signed-off-by: Ernestas Kulik <ernestas.kulik@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/libcfs/module.c

index 161e042265213939d077bc47e37aab1a51e48d3f..c388550c2d10e64c96949dcb1834ad52a70621a4 100644 (file)
@@ -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;