summaryrefslogtreecommitdiff
path: root/fs/ext4
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-11-15 21:52:06 +0200
committerMichael Bestas <mkbestas@lineageos.org>2020-11-15 21:52:18 +0200
commit6107aa6dc24cc8c196bb18e5b5ec81f8f1a275a8 (patch)
treeef508ed8340c5d6b615c713d1569d851964091f2 /fs/ext4
parent298504ed68065a61d0fc1d7969af19ecf2136ac9 (diff)
parent34b1d1174c2c7054c01cfa39d274421d80649386 (diff)
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998
This brings LA.UM.8.2.r1-07400-sdm660.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: 34b1d1174c2c7 UPSTREAM: arm64: kaslr: Fix up the kernel image alignment Conflicts: scripts/setlocalversion Change-Id: Id2981587a6e92eb10cfdc9b6d13cd4bd2abb5670
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/namei.c6
-rw-r--r--fs/ext4/super.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
index 84d4390be1be..574ca958aa2c 100644
--- a/fs/ext4/namei.c
+++ b/fs/ext4/namei.c
@@ -3217,7 +3217,7 @@ static int ext4_link(struct dentry *old_dentry,
return -EMLINK;
if (ext4_encrypted_inode(dir) &&
!ext4_is_child_context_consistent_with_parent(dir, inode))
- return -EPERM;
+ return -EXDEV;
err = dquot_initialize(dir);
if (err)
return err;
@@ -3536,7 +3536,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
ext4_encrypted_inode(new.dir) &&
!ext4_is_child_context_consistent_with_parent(new.dir,
old.inode)) {
- retval = -EPERM;
+ retval = -EXDEV;
goto end_rename;
}
@@ -3717,7 +3717,7 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
old.inode) ||
!ext4_is_child_context_consistent_with_parent(old_dir,
new.inode)))
- return -EPERM;
+ return -EXDEV;
retval = dquot_initialize(old.dir);
if (retval)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 066503e0c933..38cab49afdc0 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5188,6 +5188,11 @@ static int ext4_quota_on(struct super_block *sb, int type, int format_id,
/* Quotafile not on the same filesystem? */
if (path->dentry->d_sb != sb)
return -EXDEV;
+
+ /* Quota already enabled for this file? */
+ if (IS_NOQUOTA(d_inode(path->dentry)))
+ return -EBUSY;
+
/* Journaling quota? */
if (EXT4_SB(sb)->s_qf_names[type]) {
/* Quotafile not in fs root? */