Skip to contentSkip to conversation

cluster/gfs-kernel/src/gfs ops_inode.c

Cluster-devel [email protected] 1 participant 1 message Jun 5, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/cluster
Module name: cluster
Branch: RHEL5
Changes by: wcheng at sourceware.org 2007-06-05 17:46:38

Modified files:
gfs-kernel/src/gfs: ops_inode.c

Log message:
Bugzilla 242759

Upon memory pressure, vm could start to release inode cache entries. Any process trying to get an inode during this time period will fail. GFS flags the error as "ENOMEM" but leaves gfs_create() call without unlocking the associated directory and file glocks. This patch fixes this minor coding oversight.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/gfs-kernel/src/gfs/ops_inode.c.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.15.2.1&r2=1.15.2.2

gfs-kernel/src/gfs/ops_inode.c +3 -3
@@ -151,9 +151,9 @@
 	gfs_inode_put(ip);
 
 	if (!inode)
-		return -ENOMEM;
-
-	error = gfs_security_init(dip, ip);
+		error = -ENOMEM;
+	else
+		error = gfs_security_init(dip, ip);
 
 	gfs_glock_dq_uninit(&d_gh);
 	gfs_glock_dq_uninit(&i_gh);