]> git.baikalelectronics.ru Git - kernel.git/commit
afs: Don't over-increment the cell usage count when pinning it
authorDavid Howells <dhowells@redhat.com>
Mon, 9 Apr 2018 20:12:31 +0000 (21:12 +0100)
committerDavid Howells <dhowells@redhat.com>
Mon, 9 Apr 2018 20:12:31 +0000 (21:12 +0100)
commit2ee1112f36ae9a8b1e54962b8d208ba415effa84
tree9d9a28e5811304439cc3cc9911c124801e8b27a8
parent8ca0552ab03d0037a4285d7a2305bf42eed376eb
afs: Don't over-increment the cell usage count when pinning it

AFS cells that are added or set as the workstation cell through /proc are
pinned against removal by setting the AFS_CELL_FL_NO_GC flag on them and
taking a ref.  The ref should be only taken if the flag wasn't already set.

Fix this by making it conditional.

Without this an assertion failure will occur during module removal
indicating that the refcount is too elevated.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/afs/cell.c
fs/afs/proc.c