Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8bebe2f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (69 commits)
  fix handling of offsets in cris eeprom.c, get rid of fake on-stack files
  get rid of home-grown mutex in cris eeprom.c
  switch ecryptfs_write() to struct inode *, kill on-stack fake files
  switch ecryptfs_get_locked_page() to struct inode *
  simplify access to ecryptfs inodes in ->readpage() and friends
  AFS: Don't put struct file on the stack
  Ban ecryptfs over ecryptfs
  logfs: replace inode uid,gid,mode initialization with helper function
  ufs: replace inode uid,gid,mode initialization with helper function
  udf: replace inode uid,gid,mode init with helper
  ubifs: replace inode uid,gid,mode initialization with helper function
  sysv: replace inode uid,gid,mode initialization with helper function
  reiserfs: replace inode uid,gid,mode initialization with helper function
  ramfs: replace inode uid,gid,mode initialization with helper function
  omfs: replace inode uid,gid,mode initialization with helper function
  bfs: replace inode uid,gid,mode initialization with helper function
  ocfs2: replace inode uid,gid,mode initialization with helper function
  nilfs2: replace inode uid,gid,mode initialization with helper function
  minix: replace inode uid,gid,mode init with helper
  ext4: replace inode uid,gid,mode init with helper
  ...

Trivial conflict in fs/fs-writeback.c (mark bitfields unsigned)
parents 6109e2ce 82f3952c
Loading
Loading
Loading
Loading
+15 −33
Original line number Diff line number Diff line
@@ -73,8 +73,7 @@ struct eeprom_type
  int adapt_state; /* 1 = To high , 0 = Even, -1 = To low */
  
  /* this one is to keep the read/write operations atomic */
  wait_queue_head_t wait_q;
  volatile int busy;
  struct mutex lock;
  int retry_cnt_addr; /* Used to keep track of number of retries for
                         adaptive timing adjustments */
  int retry_cnt_read;
@@ -115,8 +114,7 @@ const struct file_operations eeprom_fops =

int __init eeprom_init(void)
{
  init_waitqueue_head(&eeprom.wait_q);
  eeprom.busy = 0;
  mutex_init(&eeprom.lock);

#ifdef CONFIG_ETRAX_I2C_EEPROM_PROBE
#define EETEXT "Found"
@@ -439,10 +437,7 @@ static loff_t eeprom_lseek(struct file * file, loff_t offset, int orig)

static int eeprom_read_buf(loff_t addr, char * buf, int count)
{
  struct file f;

  f.f_pos = addr;
  return eeprom_read(&f, buf, count, &addr);
  return eeprom_read(NULL, buf, count, &addr);
}


@@ -452,7 +447,7 @@ static int eeprom_read_buf(loff_t addr, char * buf, int count)
static ssize_t eeprom_read(struct file * file, char * buf, size_t count, loff_t *off)
{
  int read=0;
  unsigned long p = file->f_pos;
  unsigned long p = *off;

  unsigned char page;

@@ -461,12 +456,9 @@ static ssize_t eeprom_read(struct file * file, char * buf, size_t count, loff_t
    return -EFAULT;
  }
  
  wait_event_interruptible(eeprom.wait_q, !eeprom.busy);
  if (signal_pending(current))
  if (mutex_lock_interruptible(&eeprom.lock))
    return -EINTR;

  eeprom.busy++;

  page = (unsigned char) (p >> 8);
  
  if(!eeprom_address(p))
@@ -476,8 +468,7 @@ static ssize_t eeprom_read(struct file * file, char * buf, size_t count, loff_t
    i2c_stop();
    
    /* don't forget to wake them up */
    eeprom.busy--;
    wake_up_interruptible(&eeprom.wait_q);  
    mutex_unlock(&eeprom.lock);
    return -EFAULT;
  }

@@ -501,11 +492,10 @@ static ssize_t eeprom_read(struct file * file, char * buf, size_t count, loff_t
  
  if(read > 0)
  {
    file->f_pos += read;
    *off += read;
  }

  eeprom.busy--;
  wake_up_interruptible(&eeprom.wait_q);
  mutex_unlock(&eeprom.lock);
  return read;
}

@@ -513,11 +503,7 @@ static ssize_t eeprom_read(struct file * file, char * buf, size_t count, loff_t

static int eeprom_write_buf(loff_t addr, const char * buf, int count)
{
  struct file f;

  f.f_pos = addr;
  
  return eeprom_write(&f, buf, count, &addr);
  return eeprom_write(NULL, buf, count, &addr);
}


@@ -534,16 +520,14 @@ static ssize_t eeprom_write(struct file * file, const char * buf, size_t count,
    return -EFAULT;
  }

  wait_event_interruptible(eeprom.wait_q, !eeprom.busy);
  /* bail out if we get interrupted */
  if (signal_pending(current))
  if (mutex_lock_interruptible(&eeprom.lock))
    return -EINTR;
  eeprom.busy++;
  for(i = 0; (i < EEPROM_RETRIES) && (restart > 0); i++)
  {
    restart = 0;
    written = 0;
    p = file->f_pos;
    p = *off;
   
    
    while( (written < count) && (p < eeprom.size))
@@ -556,8 +540,7 @@ static ssize_t eeprom_write(struct file * file, const char * buf, size_t count,
        i2c_stop();
        
        /* don't forget to wake them up */
        eeprom.busy--;
        wake_up_interruptible(&eeprom.wait_q);
        mutex_unlock(&eeprom.lock);
        return -EFAULT;
      }
#ifdef EEPROM_ADAPTIVE_TIMING      
@@ -669,12 +652,11 @@ static ssize_t eeprom_write(struct file * file, const char * buf, size_t count,
    } /* while */
  } /* for  */

  eeprom.busy--;
  wake_up_interruptible(&eeprom.wait_q);
  if (written == 0 && file->f_pos >= eeprom.size){
  mutex_unlock(&eeprom.lock);
  if (written == 0 && p >= eeprom.size){
    return -ENOSPC;
  }
  file->f_pos += written;
  *off = p;
  return written;
}

+2 −2
Original line number Diff line number Diff line
@@ -485,7 +485,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio)
				goto out;
			}

			ret = vfs_fsync(file, file->f_path.dentry, 0);
			ret = vfs_fsync(file, 0);
			if (unlikely(ret)) {
				ret = -EIO;
				goto out;
@@ -495,7 +495,7 @@ static int do_bio_filebacked(struct loop_device *lo, struct bio *bio)
		ret = lo_send(lo, bio, pos);

		if (barrier && !ret) {
			ret = vfs_fsync(file, file->f_path.dentry, 0);
			ret = vfs_fsync(file, 0);
			if (unlikely(ret))
				ret = -EIO;
		}
+1 −1
Original line number Diff line number Diff line
@@ -1699,7 +1699,7 @@ int bitmap_create(mddev_t *mddev)
		 * and bypass the page cache, we must sync the file
		 * first.
		 */
		vfs_fsync(file, file->f_dentry, 1);
		vfs_fsync(file, 1);
	}
	/* read superblock from bitmap file (this sets mddev->bitmap_info.chunksize) */
	if (!mddev->bitmap_info.external)
+1 −1
Original line number Diff line number Diff line
@@ -654,7 +654,7 @@ static int fsg_lun_fsync_sub(struct fsg_lun *curlun)

	if (curlun->ro || !filp)
		return 0;
	return vfs_fsync(filp, filp->f_path.dentry, 1);
	return vfs_fsync(filp, 1);
}

static void store_cdrom_address(u8 *dest, int msf, u32 addr)
+1 −3
Original line number Diff line number Diff line
@@ -253,9 +253,7 @@ struct inode *v9fs_get_inode(struct super_block *sb, int mode)
		return ERR_PTR(-ENOMEM);
	}

	inode->i_mode = mode;
	inode->i_uid = current_fsuid();
	inode->i_gid = current_fsgid();
	inode_init_owner(inode, NULL, mode);
	inode->i_blocks = 0;
	inode->i_rdev = 0;
	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
Loading