linux/fs/ecryptfs
Tyler Hicks 047b8d0151 eCryptfs: Copy up attributes of the lower target inode after rename
commit 8335eafc28 upstream.

After calling into the lower filesystem to do a rename, the lower target
inode's attributes were not copied up to the eCryptfs target inode. This
resulted in the eCryptfs target inode staying around, rather than being
evicted, because i_nlink was not updated for the eCryptfs inode. This
also meant that eCryptfs didn't do the final iput() on the lower target
inode so it stayed around, as well. This would result in a failure to
free up space occupied by the target file in the rename() operation.
Both target inodes would eventually be evicted when the eCryptfs
filesystem was unmounted.

This patch calls fsstack_copy_attr_all() after the lower filesystem
does its ->rename() so that important inode attributes, such as i_nlink,
are updated at the eCryptfs layer. ecryptfs_evict_inode() is now called
and eCryptfs can drop its final reference on the lower inode.

http://launchpad.net/bugs/561129

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Tested-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-02 09:47:23 -07:00
..
crypto.c eCryptfs: Fix oops when printing debug info in extent crypto functions 2012-02-03 09:18:51 -08:00
debug.c
dentry.c eCryptfs: Handle NULL nameidata pointers 2011-02-21 14:45:57 -06:00
ecryptfs_kernel.h eCryptfs: Remove ecryptfs_header_cache_2 2011-05-29 14:24:25 -05:00
file.c eCryptfs: Flush file in vma close 2011-12-09 08:52:18 -08:00
inode.c eCryptfs: Copy up attributes of the lower target inode after rename 2012-10-02 09:47:23 -07:00
Kconfig eCryptfs: Remove Kconfig NET dependency and select MD5 2009-10-08 11:31:36 -05:00
keystore.c eCryptfs: Unlock keys needed by ecryptfsd 2011-08-04 21:58:39 -07:00
kthread.c eCryptfs: Properly check for O_RDONLY flag before doing privileged open 2012-07-16 08:47:50 -07:00
main.c Ecryptfs: Add mount option to check uid of device being mounted = expect uid 2011-08-15 18:31:41 -07: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 eCryptfs: Fix lockdep warning in miscdev operations 2012-07-16 08:47:49 -07:00
mmap.c eCryptfs: Unlock page in write_begin error path 2011-03-28 01:47:46 -05:00
read_write.c eCryptfs: Infinite loop due to overflow in ecryptfs_write() 2012-02-13 11:06:09 -08:00
super.c eCryptfs: Consolidate inode functions into inode.c 2011-05-29 12:49:53 -05:00