]> Pileus Git - ~andy/linux/blobdiff - fs/ext4/file.c
Merge branch 'topic/isa' into topic/misc
[~andy/linux] / fs / ext4 / file.c
index bd411c12d63d8362b520c520790ceb4662eabd77..ee92b66d45589c4ec97d6b7b2e5d93d871df5320 100644 (file)
@@ -70,7 +70,8 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
                struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
                size_t length = iov_length(iov, nr_segs);
 
-               if (pos > sbi->s_bitmap_maxbytes)
+               if ((pos > sbi->s_bitmap_maxbytes ||
+                   (pos == sbi->s_bitmap_maxbytes && length > 0)))
                        return -EFBIG;
 
                if (pos + length > sbi->s_bitmap_maxbytes) {