Skip to content

Commit

Permalink
staging: lustre: libcfs: use octal permissions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ernestas Kulik authored and Greg Kroah-Hartman committed Jan 27, 2017
1 parent 74e3bb7 commit b40b4bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/lustre/lnet/libcfs/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b40b4bc

Please sign in to comment.