]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fuse/dir.c
[PATCH] avoid one conditional branch in touch_atime()
[linux-2.6-omap-h63xx.git] / fs / fuse / dir.c
index c71a6c092ad9d4f372553dac847c1af91355d048..40080477ceb4fa5a2fed48f0da0c446c10614bb5 100644 (file)
@@ -141,9 +141,6 @@ static int fuse_dentry_revalidate(struct dentry *entry, struct nameidata *nd)
                struct fuse_req *forget_req;
                struct dentry *parent;
 
-               /* Doesn't hurt to "reset" the validity timeout */
-               fuse_invalidate_entry_cache(entry);
-
                /* For negative dentries, always do a fresh lookup */
                if (!inode)
                        return 0;
@@ -859,7 +856,7 @@ static int fuse_readdir(struct file *file, void *dstbuf, filldir_t filldir)
        int err;
        size_t nbytes;
        struct page *page;
-       struct inode *inode = file->f_dentry->d_inode;
+       struct inode *inode = file->f_path.dentry->d_inode;
        struct fuse_conn *fc = get_fuse_conn(inode);
        struct fuse_req *req;
 
@@ -1027,6 +1024,8 @@ static int fuse_setattr(struct dentry *entry, struct iattr *attr)
        if (attr->ia_valid & ATTR_SIZE) {
                unsigned long limit;
                is_truncate = 1;
+               if (IS_SWAPFILE(inode))
+                       return -ETXTBSY;
                limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
                if (limit != RLIM_INFINITY && attr->ia_size > (loff_t) limit) {
                        send_sig(SIGXFSZ, current, 0);