summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorChristoph Hellwig2014-06-30 17:48:30 +0200
committerJ. Bruce Fields2014-07-08 23:14:29 +0200
commit7e6a72e5f1d42768a9949d73d3337277ff96e026 (patch)
tree934632aa5d8d84374a927ddf1855dee9d5c58485 /fs/exec.c
parentNFSD: Avoid warning message when compile at i686 arch (diff)
downloadkernel-qcow2-linux-7e6a72e5f1d42768a9949d73d3337277ff96e026.tar.gz
kernel-qcow2-linux-7e6a72e5f1d42768a9949d73d3337277ff96e026.tar.xz
kernel-qcow2-linux-7e6a72e5f1d42768a9949d73d3337277ff96e026.zip
nfsd: fix file access refcount leak when nfsd4_truncate fails
nfsd4_process_open2 will currently will get access to the file, and then call nfsd4_truncate to (possibly) truncate it. If that operation fails though, then the access references will never be released as the nfs4_ol_stateid is never initialized. Fix by moving the nfsd4_truncate call into nfs4_get_vfs_file, ensuring that the refcounts are properly put if the truncate fails. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/exec.c')
0 files changed, 0 insertions, 0 deletions