 if (unlikely(file->f_error)) { int err = file->f_error; file->f_error = 0; return err; } 
inline int generic_write_checks(struct file *file, loff_t *pos, size_t *count, int isblk){	struct inode *inode = file->f_mapping->host;	unsigned long limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;        if (unlikely(*pos < 0))                return -EINVAL;        if (unlikely(file->f_error)) {                int err = file->f_error;                file->f_error = 0;                return err;        }	if (!isblk) {		/* FIXME: this is for backwards compatibility with 2.4 */		if (file->f_flags & O_APPEND)                        *pos = i_size_read(inode);		if (limit != RLIM_INFINITY) {			if (*pos >= limit) {				send_sig(SIGXFSZ, current, 0);				return -EFBIG;			}			if (*count > limit - (typeof(limit))*pos) {				*count = limit - (typeof(limit))*pos;			}		}	}	/*	 * LFS rule	 */	if (unlikely(*pos + *count > MAX_NON_LFS &&				!(file->f_flags & O_LARGEFILE))) {		if (*pos >= MAX_NON_LFS) {			send_sig(SIGXFSZ, current, 0);			return -EFBIG;		}		if (*count > MAX_NON_LFS - (unsigned long)*pos) {			*count = MAX_NON_LFS - (unsigned long)*pos;		}	}	/*	 * Are we about to exceed the fs block limit ?	 *	 * If we have written data it becomes a short write.  If we have	 * exceeded without writing data we send a signal and return EFBIG.	 * Linus frestrict idea will clean these up nicely..	 */	if (likely(!isblk)) {		if (unlikely(*pos >= inode->i_sb->s_maxbytes)) {			if (*count || *pos > inode->i_sb->s_maxbytes) {				send_sig(SIGXFSZ, current, 0);				return -EFBIG;			}			/* zero-length writes at ->s_maxbytes are OK */		}		if (unlikely(*pos + *count > inode->i_sb->s_maxbytes))			*count = inode->i_sb->s_maxbytes - *pos;	} else {		loff_t isize;		if (bdev_read_only(I_BDEV(inode)))			return -EPERM;		isize = i_size_read(inode);		if (*pos >= isize) {			if (*count || *pos > isize)				return -ENOSPC;		}		if (*pos + *count > isize)			*count = isize - *pos;	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/45778ca819accab1a4a3378b3566cab0f189164f/filemap.c/clean/mm/filemap.c