pid: tighten pidmap spinlock critical section by removing kfree()
[safe/jmp/linux-2.6] / fs / smbfs / proc.c
index feac460..71c29b6 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/stat.h>
 #include <linux/fcntl.h>
 #include <linux/dcache.h>
-#include <linux/dirent.h>
 #include <linux/nls.h>
 #include <linux/smp_lock.h>
 #include <linux/net.h>
@@ -510,7 +509,7 @@ date_unix2dos(struct smb_sb_info *server,
                month = 2;
        } else {
                nl_day = (year & 3) || day <= 59 ? day : day - 1;
-               for (month = 0; month < 12; month++)
+               for (month = 1; month < 12; month++)
                        if (day_n[month] > nl_day)
                                break;
        }
@@ -865,7 +864,7 @@ smb_newconn(struct smb_sb_info *server, struct smb_conn_opt *opt)
                goto out;
 
        error = -EACCES;
-       if (current->uid != server->mnt->mounted_uid && 
+       if (current_uid() != server->mnt->mounted_uid &&
            !capable(CAP_SYS_ADMIN))
                goto out;
 
@@ -2593,7 +2592,7 @@ smb_proc_getattr_ff(struct smb_sb_info *server, struct dentry *dentry,
        fattr->f_mtime.tv_sec = date_dos2unix(server, date, time);
        fattr->f_mtime.tv_nsec = 0;
        VERBOSE("name=%s, date=%x, time=%x, mtime=%ld\n",
-               mask, date, time, fattr->f_mtime);
+               mask, date, time, fattr->f_mtime.tv_sec);
        fattr->f_size = DVAL(req->rq_data, 12);
        /* ULONG allocation size */
        fattr->attr = WVAL(req->rq_data, 20);