kernel-ark/fs/ecryptfs
Tyler Hicks 332ab16f83 eCryptfs: Add reference counting to lower files
For any given lower inode, eCryptfs keeps only one lower file open and
multiplexes all eCryptfs file operations through that lower file. The
lower file was considered "persistent" and stayed open from the first
lookup through the lifetime of the inode.

This patch keeps the notion of a single, per-inode lower file, but adds
reference counting around the lower file so that it is closed when not
currently in use. If the reference count is at 0 when an operation (such
as open, create, etc.) needs to use the lower file, a new lower file is
opened. Since the file is no longer persistent, all references to the
term persistent file are changed to lower file.

Locking is added around the sections of code that opens the lower file
and assign the pointer in the inode info, as well as the code the fputs
the lower file when all eCryptfs users are done with it.

This patch is needed to fix issues, when mounted on top of the NFSv3
client, where the lower file is left silly renamed until the eCryptfs
inode is destroyed.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
2011-04-25 18:32:37 -05:00
..
crypto.c eCryptfs: removed num_global_auth_toks from ecryptfs_mount_crypt_stat 2011-03-28 01:49:39 -05:00
debug.c
dentry.c eCryptfs: Handle NULL nameidata pointers 2011-02-21 14:45:57 -06:00
ecryptfs_kernel.h eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
file.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
inode.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
Kconfig eCryptfs: Remove Kconfig NET dependency and select MD5 2009-10-08 11:31:36 -05:00
keystore.c eCryptfs: write lock requested keys 2011-03-28 01:49:43 -05:00
kthread.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
main.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c ecryptfs: properly mark init functions 2010-08-27 10:50:52 -05:00
miscdev.c llseek: automatically add .llseek fop 2010-10-15 15:53:27 +02:00
mmap.c eCryptfs: Unlock page in write_begin error path 2011-03-28 01:47:46 -05:00
read_write.c ecryptfs: modify write path to encrypt page in writepage 2011-03-28 01:47:45 -05:00
super.c eCryptfs: Add reference counting to lower files 2011-04-25 18:32:37 -05:00