diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-22 13:24:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-22 13:24:03 -0500 |
commit | eadee0ce6fd33defe449c97e671bf83fa230b5de (patch) | |
tree | c159a1cb09accfac1f351ce4fca24ccef9777245 /fs/filesystems.c | |
parent | 6fb11e6508eac9d2e01ba748fc13afdd657224ab (diff) | |
parent | 117aa41e8020fe493bbb677ebe828c3a4b380185 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro:
"Embarrassing braino fix + pipe page accounting + fixing an eyesore in
find_filesystem() (checking that s1 is equal to prefix of s2 of given
length can be done in many ways, but "compare strlen(s1) with length
and then do strncmp()" is not a good one...)"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
[regression] fix braino in fs/dlm/user.c
pipe: limit the per-user amount of pages allocated in pipes
find_filesystem(): simplify comparison
Diffstat (limited to 'fs/filesystems.c')
-rw-r--r-- | fs/filesystems.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/filesystems.c b/fs/filesystems.c index 5797d45a78cb..c5618db110be 100644 --- a/fs/filesystems.c +++ b/fs/filesystems.c | |||
@@ -46,9 +46,9 @@ void put_filesystem(struct file_system_type *fs) | |||
46 | static struct file_system_type **find_filesystem(const char *name, unsigned len) | 46 | static struct file_system_type **find_filesystem(const char *name, unsigned len) |
47 | { | 47 | { |
48 | struct file_system_type **p; | 48 | struct file_system_type **p; |
49 | for (p=&file_systems; *p; p=&(*p)->next) | 49 | for (p = &file_systems; *p; p = &(*p)->next) |
50 | if (strlen((*p)->name) == len && | 50 | if (strncmp((*p)->name, name, len) == 0 && |
51 | strncmp((*p)->name, name, len) == 0) | 51 | !(*p)->name[len]) |
52 | break; | 52 | break; |
53 | return p; | 53 | return p; |
54 | } | 54 | } |