patch-2.4.20 linux-2.4.20/fs/intermezzo/ext_attr.c

Next file: linux-2.4.20/fs/intermezzo/file.c
Previous file: linux-2.4.20/fs/intermezzo/dir.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/fs/intermezzo/ext_attr.c linux-2.4.20/fs/intermezzo/ext_attr.c
@@ -1,10 +1,25 @@
-/* 
- * Extended attribute handling for presto.
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ * 
+ *  Copyright (C) 2001 Tacit Networks, Inc.
+ *    Author: Shirish H. Phatak <shirish@tacitnetworks.com>
+ *
+ *   This file is part of InterMezzo, http://www.inter-mezzo.org.
+ *
+ *   InterMezzo is free software; you can redistribute it and/or
+ *   modify it under the terms of version 2 of the GNU General Public
+ *   License as published by the Free Software Foundation.
+ *
+ *   InterMezzo is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
  *
- * Copyright (C) 2001. All rights reserved.
- * Shirish H. Phatak
- * Tacit Networks, Inc.
+ *   You should have received a copy of the GNU General Public License
+ *   along with InterMezzo; if not, write to the Free Software
+ *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
+ * Extended attribute handling for presto.
  */
 
 #define __NO_VERSION__
@@ -32,10 +47,7 @@
 #include <linux/smp_lock.h>
 
 #include <linux/intermezzo_fs.h>
-#include <linux/intermezzo_upcall.h>
 #include <linux/intermezzo_psdev.h>
-#include <linux/intermezzo_kml.h>
-
 
 #ifdef CONFIG_FS_EXT_ATTR
 #include <linux/ext_attr.h>
@@ -43,9 +55,6 @@
 extern inline void presto_debug_fail_blkdev(struct presto_file_set *fset,
                                             unsigned long value);
 
-extern int presto_prep(struct dentry *, struct presto_cache **,
-                       struct presto_file_set **);
-
 
 /* VFS interface */
 /* XXX! Fixme test for user defined attributes */
@@ -77,7 +86,7 @@
          * we do a reverse mapping from inode to the first dentry 
          */
         if (list_empty(&inode->i_dentry)) {
-                printk("No alias for inode %d\n", (int) inode->i_ino);
+                CERROR("No alias for inode %d\n", (int) inode->i_ino);
                 EXIT;
                 return -EINVAL;
         }
@@ -101,12 +110,13 @@
             * (works for ext3)
             */
             if (flags & EXT_ATTR_FLAG_USER) {
-                PRESTO_ALLOC(buf, char *, buffer_len);
+                PRESTO_ALLOC(buf, buffer_len);
                 if (!buf) {
-                        printk("InterMezzo: out of memory!!!\n");
+                        CERROR("InterMezzo: out of memory!!!\n");
                         return -ENOMEM;
                 }
-                if (copy_from_user(buf, buffer, buffer_len))
+                error = copy_from_user(buf, buffer, buffer_len);
+                if (error) 
                         return -EFAULT;
             } else 
                 buf = buffer;
@@ -174,7 +184,7 @@
         fset = presto_fset(dentry);
         error = -EINVAL;
         if ( !fset ) {
-                printk("No fileset!\n");
+                CERROR("No fileset!\n");
                 EXIT;
                 goto exit_dentry;
         }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)