+ vfs-dedupe-should-return-eperm-if-permission-is-not-granted.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: vfs: dedupe should return EPERM if permission is not granted
has been added to the -mm tree.  Its filename is
     vfs-dedupe-should-return-eperm-if-permission-is-not-granted.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/vfs-dedupe-should-return-eperm-if-permission-is-not-granted.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/vfs-dedupe-should-return-eperm-if-permission-is-not-granted.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Mark Fasheh <mfasheh@xxxxxxx>
Subject: vfs: dedupe should return EPERM if permission is not granted

Right now we return EINVAL if a process does not have permission to dedupe
a file.  This was an oversight on my part.  EPERM gives a true description
of the nature of our error, and EINVAL is already used for the case that
the filesystem does not support dedupe.

Link: http://lkml.kernel.org/r/20180910232118.14424-3-mfasheh@xxxxxxx
Signed-off-by: Mark Fasheh <mfasheh@xxxxxxx>
Acked-by: David Sterba <dsterba@xxxxxxxx>
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/read_write.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/read_write.c~vfs-dedupe-should-return-eperm-if-permission-is-not-granted
+++ a/fs/read_write.c
@@ -1991,7 +1991,7 @@ int vfs_dedupe_file_range_one(struct fil
 	if (ret < 0)
 		goto out_drop_write;
 
-	ret = -EINVAL;
+	ret = -EPERM;
 	if (!allow_file_dedupe(dst_file))
 		goto out_drop_write;
 
_

Patches currently in -mm which might be from mfasheh@xxxxxxx are

vfs-allow-dedupe-of-user-owned-read-only-files.patch
vfs-dedupe-should-return-eperm-if-permission-is-not-granted.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux