diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 6 | ||||
-rw-r--r-- | fs/nfs/inode.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index c3a3a913e..35303cf20 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -321,7 +321,7 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent, desc->page = NULL; } - page = page_cache_alloc(); + page = alloc_page(GFP_HIGHUSER); if (!page) { status = -ENOMEM; goto out; @@ -1097,6 +1097,10 @@ nfs_permission(struct inode *inode, int mask) if (!NFS_PROTO(inode)->access) goto out; + + if (error == -EROFS) + goto out; + /* * Trust UNIX mode bits except: * diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index a48e711f5..abd08eebc 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -434,6 +434,11 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent) if (server->namelen == 0 || server->namelen > maxlen) server->namelen = maxlen; + if(version == 2) + sb->s_maxbytes = MAX_NON_LFS; + else + sb->s_maxbytes = ~0ULL; /* Unlimited on NFSv3 */ + /* Fire up the writeback cache */ if (nfs_reqlist_alloc(server) < 0) { printk(KERN_NOTICE "NFS: cannot initialize writeback cache.\n"); |