projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1347440
)
sysctl: An easier to read version of find_subdir
author
Eric W. Biederman
<ebiederm@xmission.com>
Tue, 31 Jan 2012 04:09:33 +0000
(20:09 -0800)
committer
Eric W. Biederman
<ebiederm@xmission.com>
Thu, 2 Feb 2012 03:20:30 +0000
(19:20 -0800)
Suggested-by: Lucian Adrian Grijincu <lucian.grijincu@gmail.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
fs/proc/proc_sysctl.c
patch
|
blob
|
history
diff --git
a/fs/proc/proc_sysctl.c
b/fs/proc/proc_sysctl.c
index 27e265ba1afed9268d684db4edc4684e4e357922..ebe8b3076db7d8379413ea73a531c78eedb06fdd 100644
(file)
--- a/
fs/proc/proc_sysctl.c
+++ b/
fs/proc/proc_sysctl.c
@@
-833,9
+833,9
@@
static struct ctl_dir *find_subdir(struct ctl_dir *dir,
entry = find_entry(&head, dir, name, namelen);
if (!entry)
return ERR_PTR(-ENOENT);
- if (S_ISDIR(entry->mode))
- return
container_of(head, struct ctl_dir, header
);
- return
ERR_PTR(-ENOTDIR
);
+ if (
!
S_ISDIR(entry->mode))
+ return
ERR_PTR(-ENOTDIR
);
+ return
container_of(head, struct ctl_dir, header
);
}
static struct ctl_dir *new_dir(struct ctl_table_set *set,