Changeset 935
- Timestamp:
- 08/03/08 22:52:13 (5 months ago)
- Location:
- trunk/unionfs-tcos
- Files:
-
- 2 removed
- 5 modified
-
2.6.26/Module.symvers (deleted)
-
2.6.26/file.c (modified) (1 diff)
-
2.6.26/main.c (modified) (1 diff)
-
2.6.26/modules.order (deleted)
-
2.6.26/union.h (modified) (1 diff)
-
Makefile (modified) (2 diffs)
-
debian/changelog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/unionfs-tcos/2.6.26/file.c
r934 r935 18 18 19 19 #include "union.h" 20 #include <linux/splice.h> 21 22 int security_file_permission (struct file *file, int mask) 23 { 24 return 0; 25 } 26 27 #define MAX_RW_COUNT (INT_MAX & PAGE_CACHE_MASK) 28 29 int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count) 30 { 31 struct inode *inode; 32 loff_t pos; 33 int retval = -EINVAL; 34 35 inode = file->f_path.dentry->d_inode; 36 if (unlikely((ssize_t) count < 0)) 37 return retval; 38 pos = *ppos; 39 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) 40 return retval; 41 42 if (unlikely(inode->i_flock && mandatory_lock(inode))) { 43 retval = locks_mandatory_area( 44 read_write == READ ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE, 45 inode, file, pos, count); 46 if (retval < 0) 47 return retval; 48 } 49 retval = security_file_permission(file, 50 read_write == READ ? MAY_READ : MAY_WRITE); 51 if (retval) 52 return retval; 53 return count > MAX_RW_COUNT ? MAX_RW_COUNT : count; 54 } 55 56 long vfs_splice_from(struct pipe_inode_info *pipe, struct file *out, 57 loff_t *ppos, size_t len, unsigned int flags) 58 { 59 int ret; 60 61 if (unlikely(!out->f_op || !out->f_op->splice_write)) 62 return -EINVAL; 63 64 if (unlikely(!(out->f_mode & FMODE_WRITE))) 65 return -EBADF; 66 67 ret = rw_verify_area(WRITE, out, ppos, len); 68 if (unlikely(ret < 0)) 69 return ret; 70 71 return out->f_op->splice_write(pipe, out, ppos, len, flags); 72 } 73 74 long vfs_splice_to(struct file *in, loff_t *ppos, 75 struct pipe_inode_info *pipe, size_t len, 76 unsigned int flags) 77 { 78 int ret; 79 80 if (unlikely(!in->f_op || !in->f_op->splice_read)) 81 return -EINVAL; 82 83 if (unlikely(!(in->f_mode & FMODE_READ))) 84 return -EBADF; 85 86 ret = rw_verify_area(READ, in, ppos, len); 87 if (unlikely(ret < 0)) 88 return ret; 89 90 return in->f_op->splice_read(in, ppos, pipe, len, flags); 91 } 20 92 21 93 static ssize_t unionfs_read(struct file *file, char __user *buf, -
trunk/unionfs-tcos/2.6.26/main.c
r934 r935 20 20 #include <linux/module.h> 21 21 #include <linux/moduleparam.h> 22 23 22 24 23 25 static void unionfs_fill_inode(struct dentry *dentry, -
trunk/unionfs-tcos/2.6.26/union.h
r934 r935 53 53 #include "linux/union_fs.h" 54 54 55 long vfs_splice_from(struct pipe_inode_info *pipe, struct file *out,56 loff_t *ppos, size_t len, unsigned int flags);57 long vfs_splice_to(struct file *in, loff_t *ppos,58 struct pipe_inode_info *pipe, size_t len,59 unsigned int flags);60 55 #define UNIONFS_SUPER_MAGIC 0xf15f083d 61 56 -
trunk/unionfs-tcos/Makefile
r934 r935 8 8 MODVERSION=$(shell echo $(KVER) | awk -F"-" '{print $$1}') 9 9 SRCPATH=$(shell if [ -d $(CURDIR)/$(MODVERSION) ]; then echo $(CURDIR)/$(MODVERSION); else echo $(CURDIR)/build; fi) 10 11 test:12 @echo KVER=$(MODVERSION)13 @echo SRCPATH=$(SRCPATH)14 10 15 11 modules: … … 26 22 27 23 modulesclean: 28 CFLAGS="$(CFLAGS)" make -C $(KDIR) SUBDIRS=`pwd`/build2 CONFIG_UNION_FS=m $(DBG_CONFIG) CC="${CROSS_COMPILE}gcc" clean 24 CFLAGS="$(CFLAGS)" make -C $(KDIR) SUBDIRS=$(SRCPATH) CONFIG_UNION_FS=m $(DBG_CONFIG) CC="${CROSS_COMPILE}gcc" clean 25 26 test: 27 @echo KVER=$(MODVERSION) 28 @echo SRCPATH=$(SRCPATH) 29 -
trunk/unionfs-tcos/debian/changelog
r934 r935 1 unionfs-tcos (1.0.2.6.26.tcos2) unstable; urgency=low 2 3 * Fix vfs_splice_from, vfs_splice_to and rw_verify_area (file.c) 4 * Move test target in Makefile to bottom 5 6 -- Mario Izquierdo (mariodebian) <mariodebian@gmail.com> Sun, 03 Aug 2008 22:51:46 +0200 7 1 8 unionfs-tcos (1.0.2.6.26.tcos1) unstable; urgency=low 2 9
