OSDN Git Service

[fuse] fix race between checking and setting file->private_data
authorMiklos Szeredi <miklos@szeredi.hu>
Wed, 26 Apr 2006 08:49:16 +0000 (10:49 +0200)
committerMiklos Szeredi <miklos@szeredi.hu>
Wed, 26 Apr 2006 08:49:16 +0000 (10:49 +0200)
commit8aa09a50b5d9dbdf627f79e19d72d82994348089
tree5b50a1b62c8b95223023053595c452b0641f5767
parent6dbbcb120570d747b00783820ee02d1e1bcf63de
[fuse] fix race between checking and setting file->private_data

BKL does not protect against races if the task may sleep between
checking and setting a value.  So move checking of file->private_data
near to setting it in fuse_fill_super().

Found by Al Viro.

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
fs/fuse/inode.c