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

exofs: remove BKL from super operations

the two places inside exofs that where taking the BKL were:
exofs_put_super() - .put_super
and
exofs_sync_fs() - which is .sync_fs and is also called from
.write_super.

Now exofs_sync_fs() is protected from itself by also taking
the sb_lock.

exofs_put_super() directly calls exofs_sync_fs() so there is no
danger between these two either.

In anyway there is absolutely nothing dangerous been done
inside exofs_sync_fs().

Unless there is some subtle race with the actual lifetime of
the super_block in regard to .put_super and some other parts
of the VFS. Which is highly unlikely.

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Boaz Harrosh and committed by
Al Viro
1ba50bbe 88a0a53d

-6
-6
fs/exofs/super.c
··· 214 214 } 215 215 216 216 lock_super(sb); 217 - lock_kernel(); 218 217 sbi = sb->s_fs_info; 219 218 fscb->s_nextid = cpu_to_le64(sbi->s_nextid); 220 219 fscb->s_numfiles = cpu_to_le32(sbi->s_numfiles); ··· 244 245 out: 245 246 if (or) 246 247 osd_end_request(or); 247 - unlock_kernel(); 248 248 unlock_super(sb); 249 249 kfree(fscb); 250 250 return ret; ··· 266 268 int num_pend; 267 269 struct exofs_sb_info *sbi = sb->s_fs_info; 268 270 269 - lock_kernel(); 270 - 271 271 if (sb->s_dirt) 272 272 exofs_write_super(sb); 273 273 ··· 282 286 osduld_put_device(sbi->s_dev); 283 287 kfree(sb->s_fs_info); 284 288 sb->s_fs_info = NULL; 285 - 286 - unlock_kernel(); 287 289 } 288 290 289 291 /*