Patchwork [3/3] ext4: Correct ext4_punch_hole return codes

login
register
mail settings
Submitter Allison Henderson
Date Jan. 14, 2012, 7:35 p.m.
Message ID <1326569701-21620-4-git-send-email-achender@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/136101/
State New
Headers show

Comments

Allison Henderson - Jan. 14, 2012, 7:35 p.m.
ext4_punch_hole returns -ENOTSUPP but it should
be using -EOPNOTSUPP

Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
---
:100644 100644 1380cd2... 38d8022... M	fs/ext4/inode.c
 fs/ext4/inode.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

Patch

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 1380cd2..38d8022 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -3466,16 +3466,16 @@  int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
 {
 	struct inode *inode = file->f_path.dentry->d_inode;
 	if (!S_ISREG(inode->i_mode))
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 
 	if (!ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS)) {
 		/* TODO: Add support for non extent hole punching */
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 	}
 
 	if (EXT4_SB(inode->i_sb)->s_cluster_ratio > 1) {
 		/* TODO: Add support for bigalloc file systems */
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 	}
 
 	return ext4_ext_punch_hole(file, offset, length);