linux/fs/ecryptfs
Tyler Hicks 8335eafc28 eCryptfs: Copy up attributes of the lower target inode after rename
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>
Cc: <stable@vger.kernel.org> [2.6.39+]
2012-09-14 09:36:03 -07:00
..
crypto.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
debug.c eCryptfs: update comment and debug statement 2007-10-16 09:43:11 -07:00
dentry.c stop passing nameidata * to ->d_revalidate() 2012-07-14 16:34:14 +04:00
ecryptfs_kernel.h - Fixes a bug when the lower filesystem mount options include 'acl', but the 2012-08-02 10:56:34 -07:00
file.c eCryptfs: Call lower ->flush() from ecryptfs_flush() 2012-09-14 09:35:54 -07:00
inode.c eCryptfs: Copy up attributes of the lower target inode after rename 2012-09-14 09:36:03 -07:00
Kconfig eCryptfs: fix compile error 2011-08-09 13:42:46 -05:00
keystore.c eCryptfs: Improve statfs reporting 2012-02-16 16:06:21 -06:00
kthread.c switch dentry_open() to struct path, make it grab references itself 2012-07-23 00:01:29 +04:00
main.c eCryptfs: Write out all dirty pages just before releasing the lower file 2012-09-14 09:11:29 -07:00
Makefile eCryptfs: remove netlink transport 2008-10-16 11:21:39 -07:00
messaging.c eCryptfs: Make all miscdev functions use daemon ptr in file private_data 2012-07-08 12:51:44 -05:00
miscdev.c eCryptfs: Make all miscdev functions use daemon ptr in file private_data 2012-07-08 12:51:44 -05:00
mmap.c eCryptfs: Revert to a writethrough cache model 2012-07-13 16:46:06 -07:00
read_write.c ecryptfs: remove the second argument of k[un]map_atomic() 2012-02-16 16:06:27 -06:00
super.c vfs: Rename end_writeback() to clear_inode() 2012-05-06 13:43:41 +08:00