## Automatically generated incremental diff ## From: linux-2.0.40-rc5 ## To: linux-2.0.40-rc6 ## Robot: $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp $ diff -urN linux-2.0.40-rc5/MAINTAINERS linux-2.0.40-rc6/MAINTAINERS --- linux-2.0.40-rc5/MAINTAINERS Tue Jun 25 11:58:12 2002 +++ linux-2.0.40-rc6/MAINTAINERS Tue Jun 25 11:58:12 2002 @@ -208,10 +208,8 @@ S: Maintained EXT2 FILE SYSTEM -P: Remy Card -M: Remy.Card@linux.org -L: linux-kernel@vger.kernel.org -S: Maintained +L: ext2-devel@lists.sourceforge.net +S: Odd fixes FILE LOCKING (flock() and fcntl()/lockf()) P: Andy Walker diff -urN linux-2.0.40-rc5/fs/open.c linux-2.0.40-rc6/fs/open.c --- linux-2.0.40-rc5/fs/open.c Sun Jun 13 10:21:03 1999 +++ linux-2.0.40-rc6/fs/open.c Tue Jun 25 11:58:13 2002 @@ -27,17 +27,17 @@ struct inode * inode; int error; - error = verify_area(VERIFY_WRITE, buf, sizeof(struct statfs)); + error = verify_area(VERIFY_WRITE, buf, sizeof (struct statfs)); if (error) return error; - error = namei(path,&inode); + error = namei(path, &inode); if (error) return error; if (!inode->i_sb->s_op->statfs) { iput(inode); return -ENOSYS; } - inode->i_sb->s_op->statfs(inode->i_sb, buf, sizeof(struct statfs)); + inode->i_sb->s_op->statfs(inode->i_sb, buf, sizeof (struct statfs)); iput(inode); return 0; } @@ -48,7 +48,7 @@ struct file * file; int error; - error = verify_area(VERIFY_WRITE, buf, sizeof(struct statfs)); + error = verify_area(VERIFY_WRITE, buf, sizeof (struct statfs)); if (error) return error; if (fd >= NR_OPEN || !(file = current->files->fd[fd])) @@ -59,7 +59,7 @@ return -ENODEV; if (!inode->i_sb->s_op->statfs) return -ENOSYS; - inode->i_sb->s_op->statfs(inode->i_sb, buf, sizeof(struct statfs)); + inode->i_sb->s_op->statfs(inode->i_sb, buf, sizeof (struct statfs)); return 0; } @@ -70,8 +70,8 @@ /* Not pretty: "inode->i_size" shouldn't really be "off_t". But it is. */ if ((off_t) length < 0) - return -EINVAL; - + return -EINVAL; + down(&inode->i_sem); newattrs.ia_size = length; newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME; @@ -91,7 +91,7 @@ struct inode * inode; int error; - error = namei(path,&inode); + error = namei(path, &inode); if (error) return error; @@ -99,7 +99,7 @@ if (S_ISDIR(inode->i_mode)) goto out; - error = permission(inode,MAY_WRITE); + error = permission(inode, MAY_WRITE); if (error) goto out; @@ -170,7 +170,7 @@ struct inode * inode; struct iattr newattrs; - error = namei(filename,&inode); + error = namei(filename, &inode); if (error) return error; if (IS_RDONLY(inode)) { @@ -180,7 +180,7 @@ /* Don't worry, the checks are done in inode_change_ok() */ newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME; if (times) { - error = verify_area(VERIFY_READ, times, sizeof(*times)); + error = verify_area(VERIFY_READ, times, sizeof (*times)); if (error) { iput(inode); return error; @@ -190,7 +190,7 @@ newattrs.ia_valid |= ATTR_ATIME_SET | ATTR_MTIME_SET; } else { if (current->fsuid != inode->i_uid && - (error = permission(inode,MAY_WRITE)) != 0) { + (error = permission(inode, MAY_WRITE)) != 0) { iput(inode); return error; } @@ -212,7 +212,7 @@ struct inode * inode; struct iattr newattrs; - error = namei(filename,&inode); + error = namei(filename, &inode); if (error) return error; if (IS_RDONLY(inode)) { @@ -223,17 +223,18 @@ newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME; if (utimes) { struct timeval times[2]; - error = verify_area(VERIFY_READ, utimes, sizeof(times)); + error = verify_area(VERIFY_READ, utimes, sizeof (times)); if (error) { iput(inode); return error; } - memcpy_fromfs(×, utimes, sizeof(times)); + memcpy_fromfs(×, utimes, sizeof (times)); newattrs.ia_atime = times[0].tv_sec; newattrs.ia_mtime = times[1].tv_sec; newattrs.ia_valid |= ATTR_ATIME_SET | ATTR_MTIME_SET; } else { - if ((error = permission(inode,MAY_WRITE)) != 0) { + if (current->fsuid != inode->i_uid && + (error = permission(inode, MAY_WRITE)) != 0) { iput(inode); return error; } @@ -259,7 +260,7 @@ old_fsgid = current->fsgid; current->fsuid = current->uid; current->fsgid = current->gid; - res = namei(filename,&inode); + res = namei(filename, &inode); if (!res) { res = permission(inode, mode); iput(inode); @@ -274,14 +275,14 @@ struct inode * inode; int error; - error = namei(filename,&inode); + error = namei(filename, &inode); if (error) return error; if (!S_ISDIR(inode->i_mode)) { iput(inode); return -ENOTDIR; } - if ((error = permission(inode,MAY_EXEC)) != 0) { + if ((error = permission(inode, MAY_EXEC)) != 0) { iput(inode); return error; } @@ -302,7 +303,7 @@ return -ENOENT; if (!S_ISDIR(inode->i_mode)) return -ENOTDIR; - if ((error = permission(inode,MAY_EXEC)) != 0) + if ((error = permission(inode, MAY_EXEC)) != 0) return error; iput(current->fs->pwd); current->fs->pwd = inode; @@ -315,7 +316,7 @@ struct inode * inode; int error; - error = namei(filename,&inode); + error = namei(filename, &inode); if (error) return error; if (!S_ISDIR(inode->i_mode)) { @@ -359,7 +360,7 @@ int error; struct iattr newattrs; - error = namei(filename,&inode); + error = namei(filename, &inode); if (error) return error; if (IS_RDONLY(inode)) { @@ -439,7 +440,7 @@ int error; struct iattr newattrs; - error = lnamei(filename,&inode); + error = lnamei(filename, &inode); if (error) return error; if (IS_RDONLY(inode)) { @@ -503,22 +504,22 @@ * for the internal routines (ie open_namei()/follow_link() etc). 00 is * used by symlinks. */ -static int do_open(const char * filename,int flags,int mode, int fd) +static int do_open(const char * filename, int flags, int mode, int fd) { struct inode * inode; struct file * f; - int flag,error; + int flag, error; f = get_empty_filp(); if (!f) return -ENFILE; f->f_flags = flag = flags; - f->f_mode = (flag+1) & O_ACCMODE; + f->f_mode = (flag + 1) & O_ACCMODE; if (f->f_mode) flag++; if (flag & O_TRUNC) flag |= 2; - error = open_namei(filename,flag,mode,&inode,NULL); + error = open_namei(filename, flag, mode, &inode, NULL); if (error) goto cleanup_file; if (f->f_mode & FMODE_WRITE) { @@ -534,7 +535,7 @@ if (inode->i_op) f->f_op = inode->i_op->default_file_ops; if (f->f_op && f->f_op->open) { - error = f->f_op->open(inode,f); + error = f->f_op->open(inode, f); if (error) goto cleanup_all; } @@ -575,7 +576,7 @@ FD_CLR(fd, ¤t->files->open_fds); } -asmlinkage int sys_open(const char * filename,int flags,int mode) +asmlinkage int sys_open(const char * filename, int flags, int mode) { char * tmp; int fd, error; @@ -585,7 +586,7 @@ return fd; error = getname(filename, &tmp); if (!error) { - error = do_open(tmp,flags,mode, fd); + error = do_open(tmp, flags, mode, fd); putname(tmp); if (!error) return fd; @@ -610,7 +611,7 @@ void __fput(struct file *filp, struct inode *inode) { if (filp->f_op && filp->f_op->release) - filp->f_op->release(inode,filp); + filp->f_op->release(inode, filp); filp->f_inode = NULL; if (filp->f_mode & FMODE_WRITE) put_write_access(inode);