X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsparc64%2Fsolaris%2Ftimod.c;h=022c80f4339233add3d1c156028506b5aa53cdbc;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=24de5062079fc823dbb8acc3cf9103643bcd8019;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/sparc64/solaris/timod.c b/arch/sparc64/solaris/timod.c index 24de50620..022c80f43 100644 --- a/arch/sparc64/solaris/timod.c +++ b/arch/sparc64/solaris/timod.c @@ -29,7 +29,7 @@ asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg); -static spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(timod_pagelock); static char * page = NULL ; #ifndef DEBUG_SOLARIS_KMALLOC @@ -853,9 +853,7 @@ asmlinkage int solaris_getmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) if(!filp) goto out; ino = filp->f_dentry->d_inode; - if (!ino) goto out; - - if (!ino->i_sock) + if (!ino || !S_ISSOCK(ino->i_mode)) goto out; ctlptr = (struct strbuf __user *)A(arg1); @@ -923,7 +921,7 @@ asmlinkage int solaris_putmsg(unsigned int fd, u32 arg1, u32 arg2, u32 arg3) ino = filp->f_dentry->d_inode; if (!ino) goto out; - if (!ino->i_sock && + if (!S_ISSOCK(ino->i_mode) && (imajor(ino) != 30 || iminor(ino) != 1)) goto out;