patch-2.3.25 linux/fs/super.c

Next file: linux/fs/udf/balloc.c
Previous file: linux/fs/smbfs/file.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/fs/super.c linux/fs/super.c
@@ -1025,14 +1025,14 @@
 	struct dentry * dentry = NULL;
 	struct inode * inode = NULL;
 	kdev_t dev;
-	int retval = -EPERM;
+	int retval;
 	unsigned long flags = 0;
 	unsigned long page = 0;
 	struct file dummy;	/* allows read-write or read-only flag */
 
-	lock_kernel();
 	if (!capable(CAP_SYS_ADMIN))
-		goto out;
+		return -EPERM;
+	lock_kernel();
 	if ((new_flags &
 	     (MS_MGC_MSK | MS_REMOUNT)) == (MS_MGC_VAL | MS_REMOUNT)) {
 		retval = copy_mount_options (data, &page);

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