nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes)
authorBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Mon, 19 Mar 2012 02:44:50 +0000 (22:44 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 28 Nov 2013 14:01:59 +0000 (14:01 +0000)
commit7ddeebd9bb1f005226b818f58cd6b2eaadf7976c
tree3d07f6819611e98e2bccf98238cf44886b3560f9
parentd1ccc87a6bdf9397675c8b086cf633db0a17ee51
nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes)

commit 06effdbb49af5f6c7d20affaec74603914acc768 upstream.

Use 32-bit or 64-bit llseek() hashes for directory offsets depending on
the NFS version. NFSv2 gets 32-bit hashes only.

NOTE: This patch got rather complex as Christoph asked to set the
filp->f_mode flag in the open call or immediatly after dentry_open()
in nfsd_open() to avoid races.
Personally I still do not see a reason for that and in my opinion
FMODE_32BITHASH/FMODE_64BITHASH flags could be set nfsd_readdir(), as it
follows directly after nfsd_open() without a chance of races.

Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/nfsd/vfs.c
fs/nfsd/vfs.h