]> git.baikalelectronics.ru Git - kernel.git/commit
knfsd: don't allocate file_locks on the stack
authorJeff Layton <jlayton@redhat.com>
Tue, 21 Aug 2012 12:03:32 +0000 (08:03 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 21 Aug 2012 18:08:39 +0000 (14:08 -0400)
commita3c1d2ec3ea408355c49fa6509c3f0bac39ee124
tree1e98dee111af862b69e1dd190cc97974a0b4e6e8
parentb4b2cd5d3c610e8aeda3ba9b8ba130cb776d1554
knfsd: don't allocate file_locks on the stack

struct file_lock is pretty large and really ought not live on the stack.
On my x86_64 machine, they're almost 200 bytes each.

    (gdb) p sizeof(struct file_lock)
    $1 = 192

...allocate them dynamically instead.

Reported-by: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c