diff options
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/file.c | 5 | ||||
-rw-r--r-- | fs/afs/super.c | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c index 5b98db127a1b..720818a7c166 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -540,8 +540,9 @@ static void afs_add_open_mmap(struct afs_vnode *vnode) if (atomic_inc_return(&vnode->cb_nr_mmap) == 1) { down_write(&vnode->volume->cell->fs_open_mmaps_lock); - list_add_tail(&vnode->cb_mmap_link, - &vnode->volume->cell->fs_open_mmaps); + if (list_empty(&vnode->cb_mmap_link)) + list_add_tail(&vnode->cb_mmap_link, + &vnode->volume->cell->fs_open_mmaps); up_write(&vnode->volume->cell->fs_open_mmaps_lock); } diff --git a/fs/afs/super.c b/fs/afs/super.c index af7cbd9949c5..5ec9fd97eccc 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c @@ -668,6 +668,7 @@ static void afs_i_init_once(void *_vnode) INIT_LIST_HEAD(&vnode->pending_locks); INIT_LIST_HEAD(&vnode->granted_locks); INIT_DELAYED_WORK(&vnode->lock_work, afs_lock_work); + INIT_LIST_HEAD(&vnode->cb_mmap_link); seqlock_init(&vnode->cb_lock); } |