Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b5b876a9 authored by Srinivasarao P's avatar Srinivasarao P
Browse files

Restore sdcardfs feature



4da740c1 Revert "ANDROID: fscrypt: add key removal notifier chain"
9b733ddb Revert "ANDROID: sdcardfs: Enable modular sdcardfs"
3b7ef788 Revert "ANDROID: vfs: Add setattr2 for filesystems with per mount permissions"
7df42051 Revert "ANDROID: vfs: fix export symbol type"
633920f3 Revert "ANDROID: vfs: Add permission2 for filesystems with per mount permissions"
d60170f9 Revert "ANDROID: vfs: fix export symbol types"
fc411cf9 Revert "ANDROID: vfs: add d_canonical_path for stacked filesystem support"
0fb8b79a Revert "ANDROID: fs: Restore vfs_path_lookup() export"
7d8d1281 ANDROID: sdcardfs: remove sdcardfs from system`

Change-Id: I675db7148a6a349d1ed630b506f26e77f55924cd
Signed-off-by: default avatarSrinivasarao P <spathi@codeaurora.org>
parent 73abf3a0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -237,6 +237,7 @@ source "fs/orangefs/Kconfig"
source "fs/adfs/Kconfig"
source "fs/affs/Kconfig"
source "fs/ecryptfs/Kconfig"
source "fs/sdcardfs/Kconfig"
source "fs/hfs/Kconfig"
source "fs/hfsplus/Kconfig"
source "fs/befs/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ obj-$(CONFIG_ISO9660_FS) += isofs/
obj-$(CONFIG_HFSPLUS_FS)	+= hfsplus/ # Before hfs to find wrapped HFS+
obj-$(CONFIG_HFS_FS)		+= hfs/
obj-$(CONFIG_ECRYPT_FS)		+= ecryptfs/
obj-$(CONFIG_SDCARD_FS)		+= sdcardfs/
obj-$(CONFIG_VXFS_FS)		+= freevxfs/
obj-$(CONFIG_NFS_FS)		+= nfs/
obj-$(CONFIG_EXPORTFS)		+= exportfs/
+11 −3
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ EXPORT_SYMBOL(setattr_copy);
 * the file open for write, as there can be no conflicting delegation in
 * that case.
 */
int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode)
int notify_change2(struct vfsmount *mnt, struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode)
{
	struct inode *inode = dentry->d_inode;
	umode_t mode = inode->i_mode;
@@ -247,7 +247,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de
			return -EPERM;

		if (!inode_owner_or_capable(inode)) {
			error = inode_permission(inode, MAY_WRITE);
			error = inode_permission2(mnt, inode, MAY_WRITE);
			if (error)
				return error;
		}
@@ -330,7 +330,9 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de
	if (error)
		return error;

	if (inode->i_op->setattr)
	if (mnt && inode->i_op->setattr2)
		error = inode->i_op->setattr2(mnt, dentry, attr);
	else if (inode->i_op->setattr)
		error = inode->i_op->setattr(dentry, attr);
	else
		error = simple_setattr(dentry, attr);
@@ -343,4 +345,10 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de

	return error;
}
EXPORT_SYMBOL_GPL(notify_change2);

int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode)
{
	return notify_change2(NULL, dentry, attr, delegated_inode);
}
EXPORT_SYMBOL(notify_change);
+1 −1
Original line number Diff line number Diff line
@@ -742,7 +742,7 @@ void do_coredump(const siginfo_t *siginfo)
			goto close_fail;
		if (!(cprm.file->f_mode & FMODE_CAN_WRITE))
			goto close_fail;
		if (do_truncate(cprm.file->f_path.dentry, 0, 0, cprm.file))
		if (do_truncate2(cprm.file->f_path.mnt, cprm.file->f_path.dentry, 0, 0, cprm.file))
			goto close_fail;
	}

+22 −0
Original line number Diff line number Diff line
@@ -867,12 +867,34 @@ static int check_for_busy_inodes(struct super_block *sb,
	return -EBUSY;
}

static BLOCKING_NOTIFIER_HEAD(fscrypt_key_removal_notifiers);

/*
 * Register a function to be executed when the FS_IOC_REMOVE_ENCRYPTION_KEY
 * ioctl has removed a key and is about to try evicting inodes.
 */
int fscrypt_register_key_removal_notifier(struct notifier_block *nb)
{
	return blocking_notifier_chain_register(&fscrypt_key_removal_notifiers,
						nb);
}
EXPORT_SYMBOL_GPL(fscrypt_register_key_removal_notifier);

int fscrypt_unregister_key_removal_notifier(struct notifier_block *nb)
{
	return blocking_notifier_chain_unregister(&fscrypt_key_removal_notifiers,
						  nb);
}
EXPORT_SYMBOL_GPL(fscrypt_unregister_key_removal_notifier);

static int try_to_lock_encrypted_files(struct super_block *sb,
				       struct fscrypt_master_key *mk)
{
	int err1;
	int err2;

	blocking_notifier_call_chain(&fscrypt_key_removal_notifiers, 0, NULL);

	/*
	 * An inode can't be evicted while it is dirty or has dirty pages.
	 * Thus, we first have to clean the inodes in ->mk_decrypted_inodes.
Loading