NFS: remove white space from nfs4xdr.c
[safe/jmp/linux-2.6] / fs / nfs / file.c
index 43164fe..d319b49 100644 (file)
@@ -128,9 +128,7 @@ nfs_file_open(struct inode *inode, struct file *filp)
                return res;
 
        nfs_inc_stats(inode, NFSIOS_VFSOPEN);
-       lock_kernel();
        res = nfs_open(inode, filp);
-       unlock_kernel();
        return res;
 }
 
@@ -190,13 +188,16 @@ static loff_t nfs_file_llseek(struct file *filp, loff_t offset, int origin)
        /* origin == SEEK_END => we must revalidate the cached file length */
        if (origin == SEEK_END) {
                struct inode *inode = filp->f_mapping->host;
+
                int retval = nfs_revalidate_file_size(inode, filp);
                if (retval < 0)
                        return (loff_t)retval;
-       }
-       lock_kernel();  /* BKL needed? */
-       loff = generic_file_llseek_unlocked(filp, offset, origin);
-       unlock_kernel();
+
+               spin_lock(&inode->i_lock);
+               loff = generic_file_llseek_unlocked(filp, offset, origin);
+               spin_unlock(&inode->i_lock);
+       } else
+               loff = generic_file_llseek_unlocked(filp, offset, origin);
        return loff;
 }
 
@@ -398,9 +399,7 @@ static int nfs_write_end(struct file *file, struct address_space *mapping,
                        zero_user_segment(page, pglen, PAGE_CACHE_SIZE);
        }
 
-       lock_kernel();
        status = nfs_updatepage(file, page, offset, copied);
-       unlock_kernel();
 
        unlock_page(page);
        page_cache_release(page);
@@ -703,13 +702,6 @@ static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl)
                        filp->f_path.dentry->d_name.name,
                        fl->fl_type, fl->fl_flags);
 
-       /*
-        * No BSD flocks over NFS allowed.
-        * Note: we could try to fake a POSIX lock request here by
-        * using ((u32) filp | 0x80000000) or some such as the pid.
-        * Not sure whether that would be unique, though, or whether
-        * that would break in other places.
-        */
        if (!(fl->fl_flags & FL_FLOCK))
                return -ENOLCK;