Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
"The alloc_super() one is a regression in this merge window, lazytime
thing is older..."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
VFS: Handle lazytime in do_mount()
alloc_super(): do ->s_umount initialization earlier

+19 -19
+1
fs/namespace.c
··· 2826 2826 SB_DIRSYNC | 2827 2827 SB_SILENT | 2828 2828 SB_POSIXACL | 2829 + SB_LAZYTIME | 2829 2830 SB_I_VERSION); 2830 2831 2831 2832 if (flags & MS_REMOUNT)
+18 -19
fs/super.c
··· 191 191 192 192 INIT_LIST_HEAD(&s->s_mounts); 193 193 s->s_user_ns = get_user_ns(user_ns); 194 + init_rwsem(&s->s_umount); 195 + lockdep_set_class(&s->s_umount, &type->s_umount_key); 196 + /* 197 + * sget() can have s_umount recursion. 198 + * 199 + * When it cannot find a suitable sb, it allocates a new 200 + * one (this one), and tries again to find a suitable old 201 + * one. 202 + * 203 + * In case that succeeds, it will acquire the s_umount 204 + * lock of the old one. Since these are clearly distrinct 205 + * locks, and this object isn't exposed yet, there's no 206 + * risk of deadlocks. 207 + * 208 + * Annotate this by putting this lock in a different 209 + * subclass. 210 + */ 211 + down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING); 194 212 195 213 if (security_sb_alloc(s)) 196 214 goto fail; ··· 236 218 goto fail; 237 219 if (list_lru_init_memcg(&s->s_inode_lru)) 238 220 goto fail; 239 - 240 - init_rwsem(&s->s_umount); 241 - lockdep_set_class(&s->s_umount, &type->s_umount_key); 242 - /* 243 - * sget() can have s_umount recursion. 244 - * 245 - * When it cannot find a suitable sb, it allocates a new 246 - * one (this one), and tries again to find a suitable old 247 - * one. 248 - * 249 - * In case that succeeds, it will acquire the s_umount 250 - * lock of the old one. Since these are clearly distrinct 251 - * locks, and this object isn't exposed yet, there's no 252 - * risk of deadlocks. 253 - * 254 - * Annotate this by putting this lock in a different 255 - * subclass. 256 - */ 257 - down_write_nested(&s->s_umount, SINGLE_DEPTH_NESTING); 258 221 s->s_count = 1; 259 222 atomic_set(&s->s_active, 1); 260 223 mutex_init(&s->s_vfs_rename_mutex);