diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-22 21:24:03 +0300 | 
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-22 21:24:03 +0300 | 
| commit | eadee0ce6fd33defe449c97e671bf83fa230b5de (patch) | |
| tree | c159a1cb09accfac1f351ce4fca24ccef9777245 /fs/filesystems.c | |
| parent | 6fb11e6508eac9d2e01ba748fc13afdd657224ab (diff) | |
| parent | 117aa41e8020fe493bbb677ebe828c3a4b380185 (diff) | |
| download | linux-eadee0ce6fd33defe449c97e671bf83fa230b5de.tar.xz | |
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)  static struct file_system_type **find_filesystem(const char *name, unsigned len)  {  	struct file_system_type **p; -	for (p=&file_systems; *p; p=&(*p)->next) -		if (strlen((*p)->name) == len && -		    strncmp((*p)->name, name, len) == 0) +	for (p = &file_systems; *p; p = &(*p)->next) +		if (strncmp((*p)->name, name, len) == 0 && +		    !(*p)->name[len])  			break;  	return p;  }  | 
