Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs pile (part one) from Al Viro: "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent locking violations, etc. The most visible changes here are death of FS_REVAL_DOT (replaced with "has ->d_weak_revalidate()") and a new helper getting from struct file to inode. Some bits of preparation to xattr method interface changes. Misc patches by various people sent this cycle *and* ocfs2 fixes from several cycles ago that should've been upstream right then. PS: the next vfs pile will be xattr stuff." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits) saner proc_get_inode() calling conventions proc: avoid extra pde_put() in proc_fill_super() fs: change return values from -EACCES to -EPERM fs/exec.c: make bprm_mm_init() static ocfs2/dlm: use GFP_ATOMIC inside a spin_lock ocfs2: fix possible use-after-free with AIO ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero target: writev() on single-element vector is pointless export kernel_write(), convert open-coded instances fs: encode_fh: return FILEID_INVALID if invalid fid_type kill f_vfsmnt vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op nfsd: handle vfs_getattr errors in acl protocol switch vfs_getattr() to struct path default SET_PERSONALITY() in linux/elf.h ceph: prepopulate inodes only when request is aborted d_hash_and_lookup(): export, switch open-coded instances 9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate() 9p: split dropping the acls from v9fs_set_create_acl() ...
This commit is contained in:
@@ -181,7 +181,7 @@ static int dsp56k_upload(u_char __user *bin, int len)
|
||||
static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int dev = iminor(inode) & 0x0f;
|
||||
|
||||
switch(dev)
|
||||
@@ -244,7 +244,7 @@ static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
|
||||
static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int dev = iminor(inode) & 0x0f;
|
||||
|
||||
switch(dev)
|
||||
@@ -306,7 +306,7 @@ static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t co
|
||||
static long dsp56k_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int dev = iminor(file->f_path.dentry->d_inode) & 0x0f;
|
||||
int dev = iminor(file_inode(file)) & 0x0f;
|
||||
void __user *argp = (void __user *)arg;
|
||||
|
||||
switch(dev)
|
||||
@@ -408,7 +408,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd,
|
||||
#if 0
|
||||
static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int dev = iminor(file->f_path.dentry->d_inode) & 0x0f;
|
||||
int dev = iminor(file_inode(file)) & 0x0f;
|
||||
|
||||
switch(dev)
|
||||
{
|
||||
|
@@ -125,7 +125,7 @@ static char dtlk_write_tts(char);
|
||||
static ssize_t dtlk_read(struct file *file, char __user *buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
unsigned int minor = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned int minor = iminor(file_inode(file));
|
||||
char ch;
|
||||
int i = 0, retries;
|
||||
|
||||
@@ -177,7 +177,7 @@ static ssize_t dtlk_write(struct file *file, const char __user *buf,
|
||||
}
|
||||
#endif
|
||||
|
||||
if (iminor(file->f_path.dentry->d_inode) != DTLK_MINOR)
|
||||
if (iminor(file_inode(file)) != DTLK_MINOR)
|
||||
return -EINVAL;
|
||||
|
||||
while (1) {
|
||||
|
@@ -294,7 +294,7 @@ static int lp_wait_ready(int minor, int nonblock)
|
||||
static ssize_t lp_write(struct file * file, const char __user * buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
unsigned int minor = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned int minor = iminor(file_inode(file));
|
||||
struct parport *port = lp_table[minor].dev->port;
|
||||
char *kbuf = lp_table[minor].lp_buffer;
|
||||
ssize_t retv = 0;
|
||||
@@ -413,7 +413,7 @@ static ssize_t lp_read(struct file * file, char __user * buf,
|
||||
size_t count, loff_t *ppos)
|
||||
{
|
||||
DEFINE_WAIT(wait);
|
||||
unsigned int minor=iminor(file->f_path.dentry->d_inode);
|
||||
unsigned int minor=iminor(file_inode(file));
|
||||
struct parport *port = lp_table[minor].dev->port;
|
||||
ssize_t retval = 0;
|
||||
char *kbuf = lp_table[minor].lp_buffer;
|
||||
@@ -679,7 +679,7 @@ static long lp_ioctl(struct file *file, unsigned int cmd,
|
||||
struct timeval par_timeout;
|
||||
int ret;
|
||||
|
||||
minor = iminor(file->f_path.dentry->d_inode);
|
||||
minor = iminor(file_inode(file));
|
||||
mutex_lock(&lp_mutex);
|
||||
switch (cmd) {
|
||||
case LPSETTIMEOUT:
|
||||
@@ -707,7 +707,7 @@ static long lp_compat_ioctl(struct file *file, unsigned int cmd,
|
||||
struct timeval par_timeout;
|
||||
int ret;
|
||||
|
||||
minor = iminor(file->f_path.dentry->d_inode);
|
||||
minor = iminor(file_inode(file));
|
||||
mutex_lock(&lp_mutex);
|
||||
switch (cmd) {
|
||||
case LPSETTIMEOUT:
|
||||
|
@@ -708,7 +708,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
|
||||
{
|
||||
loff_t ret;
|
||||
|
||||
mutex_lock(&file->f_path.dentry->d_inode->i_mutex);
|
||||
mutex_lock(&file_inode(file)->i_mutex);
|
||||
switch (orig) {
|
||||
case SEEK_CUR:
|
||||
offset += file->f_pos;
|
||||
@@ -725,7 +725,7 @@ static loff_t memory_lseek(struct file *file, loff_t offset, int orig)
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
}
|
||||
mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
|
||||
mutex_unlock(&file_inode(file)->i_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index)
|
||||
ssize_t nsc_gpio_write(struct file *file, const char __user *data,
|
||||
size_t len, loff_t *ppos)
|
||||
{
|
||||
unsigned m = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned m = iminor(file_inode(file));
|
||||
struct nsc_gpio_ops *amp = file->private_data;
|
||||
struct device *dev = amp->dev;
|
||||
size_t i;
|
||||
@@ -104,7 +104,7 @@ ssize_t nsc_gpio_write(struct file *file, const char __user *data,
|
||||
ssize_t nsc_gpio_read(struct file *file, char __user * buf,
|
||||
size_t len, loff_t * ppos)
|
||||
{
|
||||
unsigned m = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned m = iminor(file_inode(file));
|
||||
int value;
|
||||
struct nsc_gpio_ops *amp = file->private_data;
|
||||
|
||||
|
@@ -1400,7 +1400,7 @@ static long cmm_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
struct cm4000_dev *dev = filp->private_data;
|
||||
unsigned int iobase = dev->p_dev->resource[0]->start;
|
||||
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(filp);
|
||||
struct pcmcia_device *link;
|
||||
int size;
|
||||
int rc;
|
||||
|
@@ -107,7 +107,7 @@ static inline void pp_enable_irq (struct pp_struct *pp)
|
||||
static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
|
||||
loff_t * ppos)
|
||||
{
|
||||
unsigned int minor = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned int minor = iminor(file_inode(file));
|
||||
struct pp_struct *pp = file->private_data;
|
||||
char * kbuffer;
|
||||
ssize_t bytes_read = 0;
|
||||
@@ -189,7 +189,7 @@ static ssize_t pp_read (struct file * file, char __user * buf, size_t count,
|
||||
static ssize_t pp_write (struct file * file, const char __user * buf,
|
||||
size_t count, loff_t * ppos)
|
||||
{
|
||||
unsigned int minor = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned int minor = iminor(file_inode(file));
|
||||
struct pp_struct *pp = file->private_data;
|
||||
char * kbuffer;
|
||||
ssize_t bytes_written = 0;
|
||||
@@ -324,7 +324,7 @@ static enum ieee1284_phase init_phase (int mode)
|
||||
|
||||
static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
unsigned int minor = iminor(file->f_path.dentry->d_inode);
|
||||
unsigned int minor = iminor(file_inode(file));
|
||||
struct pp_struct *pp = file->private_data;
|
||||
struct parport * port;
|
||||
void __user *argp = (void __user *)arg;
|
||||
|
@@ -312,7 +312,7 @@ static int ps3flash_flush(struct file *file, fl_owner_t id)
|
||||
|
||||
static int ps3flash_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int err;
|
||||
mutex_lock(&inode->i_mutex);
|
||||
err = ps3flash_writeback(ps3flash_dev);
|
||||
|
@@ -80,7 +80,7 @@ static int raw_open(struct inode *inode, struct file *filp)
|
||||
filp->f_flags |= O_DIRECT;
|
||||
filp->f_mapping = bdev->bd_inode->i_mapping;
|
||||
if (++raw_devices[minor].inuse == 1)
|
||||
filp->f_path.dentry->d_inode->i_mapping =
|
||||
file_inode(filp)->i_mapping =
|
||||
bdev->bd_inode->i_mapping;
|
||||
filp->private_data = bdev;
|
||||
mutex_unlock(&raw_mutex);
|
||||
|
@@ -938,7 +938,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
|
||||
}
|
||||
|
||||
if (ret > 0) {
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
inode->i_atime = current_fs_time(inode->i_sb);
|
||||
}
|
||||
|
||||
|
@@ -164,7 +164,7 @@ static ssize_t tanbac_tb0219_read(struct file *file, char __user *buf, size_t le
|
||||
unsigned int minor;
|
||||
char value;
|
||||
|
||||
minor = iminor(file->f_path.dentry->d_inode);
|
||||
minor = iminor(file_inode(file));
|
||||
switch (minor) {
|
||||
case 0:
|
||||
value = get_led();
|
||||
@@ -200,7 +200,7 @@ static ssize_t tanbac_tb0219_write(struct file *file, const char __user *data,
|
||||
int retval = 0;
|
||||
char c;
|
||||
|
||||
minor = iminor(file->f_path.dentry->d_inode);
|
||||
minor = iminor(file_inode(file));
|
||||
switch (minor) {
|
||||
case 0:
|
||||
type = TYPE_LED;
|
||||
|
Reference in New Issue
Block a user