diff options
Diffstat (limited to 'fs/afs/proc.c')
-rw-r--r-- | fs/afs/proc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 1c95756335b7..2f04d37eeef0 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c @@ -284,7 +284,8 @@ static ssize_t afs_proc_cells_write(struct file *file, const char __user *buf, goto done; } - set_bit(AFS_CELL_FL_NO_GC, &cell->flags); + if (test_and_set_bit(AFS_CELL_FL_NO_GC, &cell->flags)) + afs_put_cell(net, cell); printk("kAFS: Added new cell '%s'\n", name); } else { goto inval; |