VFS: Cachefiles should perform fs modifications on the top layer only
Cachefiles should perform fs modifications (eg. vfs_unlink()) on the top layer only and should not attempt to alter the lower layer. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -446,7 +446,7 @@ static int cachefiles_attr_changed(struct fscache_object *_object)
|
||||
return 0;
|
||||
|
||||
cachefiles_begin_secure(cache, &saved_cred);
|
||||
mutex_lock(&object->backer->d_inode->i_mutex);
|
||||
mutex_lock(&d_inode(object->backer)->i_mutex);
|
||||
|
||||
/* if there's an extension to a partial page at the end of the backing
|
||||
* file, we need to discard the partial page so that we pick up new
|
||||
@@ -465,7 +465,7 @@ static int cachefiles_attr_changed(struct fscache_object *_object)
|
||||
ret = notify_change(object->backer, &newattrs, NULL);
|
||||
|
||||
truncate_failed:
|
||||
mutex_unlock(&object->backer->d_inode->i_mutex);
|
||||
mutex_unlock(&d_inode(object->backer)->i_mutex);
|
||||
cachefiles_end_secure(cache, saved_cred);
|
||||
|
||||
if (ret == -EIO) {
|
||||
|
Reference in New Issue
Block a user